Created
October 29, 2016 23:46
-
-
Save vedant/e62fa7fe80b958fda5c05bfdafbb6f3a to your computer and use it in GitHub Desktop.
Set up Ubuntu 14.04 to run Tensorflow
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
echo "hostname" > /etc/hostname | |
echo "127.0.0.1 davinci" >> /etc/hosts | |
sudo service hostname restart | |
export PS1="\[\e[01;31m\]\u\[\e[00m\]@\[\e[01;34m\]\h\[\e[00m\] [\A] [\[\e[01;32m\]\W\[\e[00m\]] :: " | |
# Set up NVIDIA Drivers | |
sudo add-apt-repository -y ppa:graphics-drivers/ppa | |
sudo apt-get update | |
sudo apt-get install -y dkms | |
sudo apt-get install -y linux-headers-generic | |
sudo apt-get install -y nvidia-361 | |
echo blacklist nouveau | sudo tee -a /etc/modprobe.d/blacklist-nouveau.conf | |
echo options nouveau modeset=0 | sudo tee -a /etc/modprobe.d/blacklist-nouveau.conf | |
sudo update-initramfs -u | |
sudo apt-get install -y nvidia-modprobe | |
# Set up Docker | |
sudo apt-get update | |
sudo curl -fsSL https://get.docker.com/ | sh | |
sudo curl -fsSL https://get.docker.com/gpg | sudo apt-key add - | |
# Set up Nvidia Docker | |
wget https://github.com/NVIDIA/nvidia-docker/releases/download/v1.0.0-rc.3/nvidia-docker_1.0.0.rc.3-1_amd64.deb | |
sudo dpkg -i nvidia-docker_1.0.0.rc.3-1_amd64.deb | |
sudo rm nvidia-docker_1.0.0.rc.3-1_amd64.deb | |
# Get Docker image | |
sudo docker pull gcr.io/tensorflow/tensorflow:0.10.0-gpu | |
mkdir /home/ubuntu/opt | |
# sudo mount /dev/xvdf /home/ubuntu/opt/ | |
sudo nvidia-docker run -itd --name=tensorflow-gpu -v /home/ubuntu/opt:/opt/ -p 8754:8888 -p 6006:6006 gcr.io/tensorflow/tensorflow:0.10.0-gpu | |
#sudo nvidia-docker exec -it tensorflow-gpu bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment