-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-env-cpuonly.sh
executable file
·60 lines (52 loc) · 1.94 KB
/
build-env-cpuonly.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
#if [ ! -f env_faro/bin/activate ]; then
# echo "Creating env_faro..."
# virtualenv -p python3 env_faro
# echo "export PYTHONPATH=`pwd`/src" >> env_faro/bin/activate
# echo "export PATH=`pwd`/bin:\$PATH" >> env_faro/bin/activate
# source env_faro/bin/activate
# pip install -U protobuf grpcio grpcio.tools pyvision_toolkit
#fi
if [ ! -f env_faro_server_cpu/bin/activate ]; then
echo "Creating env_faro_server_cpu..."
virtualenv -p python3 env_faro_server_cpu
echo "export PYTHONPATH=`pwd`/src" >> env_faro_server_cpu/bin/activate
echo "export PATH=`pwd`/bin:\$PATH" >> env_faro_server_cpu/bin/activate
source env_faro_server_cpu/bin/activate
pip install -U protobuf grpcio grpcio.tools pyvision_toolkit
pip install -U keras_vggface
# Test for an nvidia gpu
pip uninstall -y tensorflow-gpu tensorflow # this is installed by keras_vggface but we want the gpu version
#if which nvidia-smi; then
# pip install -U tensorflow-gpu
#else
pip install -U tensorflow==1.13.1
#fi
pip install -U keras==2.2.0 # The newer versions have a bug
# pip install -U dlib
wget http://dlib.net/files/dlib-19.18.tar.bz2
tar xzf dlib-19.18.tar.bz2
pushd dlib-19.18
python setup.py install --no DLIB_USE_CUDA
popd
fi
#if [ ! -f env_faro_server2/bin/activate ]; then
# echo "Creating env_faro_server..."
# virtualenv -p python2 env_faro_server2
# echo "export PYTHONPATH=`pwd`/src" >> env_faro_server2/bin/activate
# echo "export PATH=`pwd`/bin:\$PATH" >> env_faro_server2/bin/activate
# source env_faro_server2/bin/activate
# pip install -U protobuf grpcio grpcio.tools pyvision_toolkit
# pip install -U keras_vggface
#
# # Test for an nvidia gpu
# pip uninstall -y tensorflow-gpu tensorflow # this is installed by keras_vggface but we want the gpu version
# if which nvidia-smi; then
# pip install -U tensorflow-gpu
# else
# pip install -U tensorflow
# fi
#
# pip install -U keras==2.2.0 # The newer versions have a bug
# pip install -U dlib
#fi