-
Notifications
You must be signed in to change notification settings - Fork 57
/
sonnet.sh
executable file
·58 lines (45 loc) · 1.11 KB
/
sonnet.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
# source: https://gist.github.com/phatblat/1713458
# Save script's current directory
DIR=$(pwd)
set -e
set -u
set -x
echo "############################"
echo "# Sonnet - keras.io"
echo "############################"
echo ""
echo "Deep Learning library for Python. Convnets, recurrent neural networks, and more. Runs on Theano or TensorFlow."
echo ""
echo "MANUAL STEPS REQUIRED - FIRST FOLLOW tensorflow.sh instructions"
# install https://github.com/fchollet/keras
cd ~/src/
if [ ! -d ~/src/sonnet ]
then
git clone --recursive https://github.com/deepmind/sonnet.git
fi
cd sonnet
git pull
cd tensorflow
./configure
cd ../
mkdir /tmp/sonnet
bazel build --config=opt :install
./bazel-bin/install /tmp/sonnet
if [! -z `pip show sonnet`]
then
echo "Uninstall sonnet if it was already installed"
sudo pip uninstall -y sonnet
fi
sudo pip install /tmp/sonnet/*.whl
sudo python setup.py install
# python setup.py install --user
cd ~/src/
if [ ! -d ~/src/keras-contrib ]
then
git clone https://github.com/farizrahman4u/keras-contrib.git
fi
cd keras-contrib
git pull
python setup.py install
# python setup.py install --user
cd $DIR