Last active
July 27, 2017 11:59
-
-
Save nassarofficial/a22cfd208b5d799bbe79ca731a8d6b4e to your computer and use it in GitHub Desktop.
gcloud bash script GPU CUDNN KERAS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~/ | |
### CUDA | |
echo "\n\nChecking for CUDA and installing." | |
if ! dpkg-query -W cuda; then | |
curl -O http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb | |
sudo dpkg -i ./cuda-repo-ubuntu1604_8.0.61-1_amd64.deb | |
sudo apt-get update | |
sudo apt-get install cuda -y | |
fi | |
wget "http://files.fast.ai/files/cudnn.tgz" -O "cudnn.tgz" | |
tar -zxf cudnn.tgz | |
cd cuda | |
sudo cp lib64/* /usr/local/cuda/lib64/ | |
sudo cp include/* /usr/local/cuda/include/ | |
echo '{ | |
"image_dim_ordering": "th", | |
"epsilon": 1e-07, | |
"floatx": "float32", | |
"backend": "theano" | |
}' > ~/.keras/keras.json | |
echo '[global] | |
floatX=float32 | |
device=gpu0 | |
optimizer = fast_run | |
[blas] | |
ldflags = -L/usr/local/lib -lopenblas | |
[nvcc] | |
fastmath=True | |
optimizer_including=cudnn | |
[cuda] | |
root=/usr/local/cuda | |
[lib] | |
cnmem = 1.0' > ~/.theanorc | |
sudo apt-get install python-pip | |
pip install keras==1.2.0 | |
pip install opencv-python | |
pip install h5py | |
pip install -U scikit-learn | |
sudo apt-get install python-joblib | |
pip install joblib | |
pip install scikit-image | |
pip install tifffile | |
pip install pandas |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment