forked from cmgreen210/TensorFlowDeepAutoencoder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_linux
executable file
·38 lines (33 loc) · 1017 Bytes
/
setup_linux
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
#!/usr/bin/env bash
VENV="venv"
CPU_LOC="https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl"
GPU_LOC="https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl"
GPU=0
function usage
{
echo "Usage: sudo setup_linux [--gpu]"
echo ""
echo "Help: setup_linux --help"
}
if [ $# -gt 0 ]; then
case $1 in
-g | --gpu ) shift
GPU=1
;;
-h | --help ) usage
exit
;;
* ) usage
exit 1
esac
shift
fi
LOC="$CPU_LOC"
if [ "$GPU" -eq 1 ]; then
LOC="$GPU_LOC"
fi
sudo apt-get install python-pip python-dev python-virtualenv
virtualenv --system-site-packages "$VENV"
source "$VENV/bin/activate"
pip install -r requirements.txt
pip install --upgrade "$LOC"