-
Notifications
You must be signed in to change notification settings - Fork 18
/
setup-new02.sh
143 lines (70 loc) · 3.53 KB
/
setup-new02.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#!/bin/bash
# only need to run this script with the command (do not type the #)
# bash setup-new.sh
echo "First checking the Python version"
python --version
echo "--------------------------------------------------------------"
echo ". "
echo "Now checking is pip is installed"
pip list
echo "--------------------------------------------------------------"
echo ". "
echo "next list this directory"
pwd
ls -lah
echo "--------------------------------------------------------------"
echo "Some other useful commands are cd cd .. dir ls pwd "
echo "."
echo "Installing PIP and Virtual Environment"
sudo apt-get install python-pip python-dev python-virtualenv
echo "--------------------------------------------------------------"
echo ". "
echo "make the tensorflow environment"
virtualenv --system-site-packages ~/virtual-tf
echo "--------------------------------------------------------------"
echo ". "
echo "Activate the environemtn use deactivate to get your cursor back"
source ~/virtual-tf/bin/activate
printf "\n\nsource ~/virtual-tf/bin/activate " >> ~/.profile
printf "\necho 'enter deactivate to get out of the virtual enviroment'" >> ~/.profile
echo "--------------------------------------------------------------"
echo ". "
echo "Now intall tensorFlow into the enviroment"
pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
#PYTHONUSERBASE=/home/ubuntu/workspace/tensorflow pip install --user --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
#export PYTHONPATH=/home/ubuntu/workspace/tensorflow:$PYTHONPATH
#export PATH=/home/ubuntu/workspace/tensorflow/bin:$PATH
echo "--------------------------------------------------------------"
echo ". "
echo "Unfortunately on cloud 9 Pip hides the TensorFlow folder so lets clone it for our use"
echo "Kind of wasteful but it isn't on our computer anyway"
#deactivate
git clone --recurse-submodules https://github.com/tensorflow/tensorflow
echo "--------------------------------------------------------------"
echo ". "
echo "Installing a few extra packages"
pip install matplotlib
pip install scikit-learn
pip install git+git://github.com/tensorflow/skflow.git
echo "------------------------Tensorflow installed--------------------------------------"
echo "--------------------------------------------------------------"
echo "--------------------------------------------------------------"
echo "--------------------------------------------------------------"
echo "--------------------------------------------------------------"
echo "--------------------------------------------------------------"
echo "--------------------------------------------------------------"
echo ". "
#echo "Unfortunately on cloud 9 Pip hides the TensorFlow folder so lets clone it for our use"
#echo "Kind of wasteful but it isn't on our computer anyway"
#deactivate
git clone --recurse-submodules https://github.com/tensorflow/tensorflow
echo "Make a quick link to udacity files"
ln -s /home/ubuntu/workspace/tensorflow/tensorflow/examples/udacity /home/ubuntu/workspace/udacityLink
echo "enter deactivate to get out of the virtual enviroment"
echo "--------------------------------------------------------------"
echo ". "
pip install --upgrade ipython
pip install --upgrade jupyter
#jupyter notebook --ip=0.0.0.0 --port=8080 --no-browser
jupyter notebook --ip $IP --port $PORT --no-browser
# bash file stays here so no more commands will work