sudo apt-get update
sudo apt-get upgrade
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.6
wget https://bootstrap.pypa.io/get-pip.py
sudo python3.6 get-pip.py
sudo apt-get install build-essential
sudo apt-get install git zip unzip
lspci | grep -i nvidia
uname -m && cat /etc/*release
uname -r
sudo apt-get install linux-headers-$(uname -r)
wget https://developer.nvidia.com/compute/cuda/10.0/Prod/local_installers/cuda-repo-ubuntu1604-10-0-local-10.0.130-410.48_1.0-1_amd64
sudo dpkg -i cuda-repo-ubuntu1604-10-0-local-10.0.130-410.48_1.0-1_amd64
sudo apt-key add /var/cuda-repo-10-0-local-10.0.130-410.48/7fa2af80.pub
sudo apt-get update
sudo apt-get install cuda
echo 'export PATH=/usr/local/cuda-10.0/bin${PATH:+:${PATH}}' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}' >> ~/.bashrc
source ~/.bashrc
Download cuDNN v7.5.0 from NVIDIA as in Local Setup. Note that this time you are installing cuDNN on virtual machine instance with Linux.
gcloud compute scp [LOCAL_FILE_PATH] ecbm4040@your-instance-name:
cp cudnn-10.0-linux-x64-v7.5.0.56.solitairetheme8 cudnn-10.0-linux-x64-v7.5.0.56.tgz
tar xvf cudnn-10.0-linux-x64-v7.5.0.56.tgz
sudo cp cuda/include/cudnn.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
source ~/.bashrc
conda create -n envTF113 python=3.6
source activate envTF113
conda install pandas numpy scipy pillow matplotlib scikit-learn
conda install -c conda-forge jupyterlab
pip install tensorflow-gpu==1.13.1
pip install --upgrade tensorflow
Note: By installing version 2.0, you need to go for *_tf2.0 assignments.
Now you can proceed to Step 3 in GCP Setup.