Skip to content

Instantly share code, notes, and snippets.

@spro
Last active May 25, 2017 02:13
Show Gist options
  • Save spro/2cef7df4509bad1abfe35e23a83ea1f7 to your computer and use it in GitHub Desktop.
Save spro/2cef7df4509bad1abfe35e23a83ea1f7 to your computer and use it in GitHub Desktop.
#!/bin/bash
HOSTNAME=$1
# Set up environment
git clone http://github.com/spro/dotfiles
cd dotfiles && ./bin/install-dotfiles
cd ~
sudo hostname $HOSTNAME
source ~/.bash_profile
# Set up CUDA
wget http://us.download.nvidia.com/tesla/375.51/nvidia-driver-local-repo-ubuntu1604_375.51-1_amd64.deb
sudo dpkg -i nvidia-driver-local-repo-ubuntu1604_375.51-1_amd64.deb
sudo apt-get update
sudo apt-get -y install cuda-drivers
# Install Anaconda
curl -O https://repo.continuum.io/archive/Anaconda3-4.3.1-Linux-x86_64.sh
bash Anaconda3-4.3.1-Linux-x86_64.sh -b
echo "PATH=\$HOME/anaconda3/bin:\$PATH" >> ~/.paths
source ~/.paths
# Install PyTorch
conda install pytorch torchvision cuda80 -c soumith
pip install sconce visdom
# Reboot to load CUDA drivers
sudo reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment