- Edited
I keep breaking and having to reinstall my Ubuntu setup, so I figured I'd make a little document that helps me do that faster.
From a completely fresh install.
First things first.
- Download and install Chrome.
sudo apt updatesudo apt upgradesudo apt install curlsudo apt install vimsudo apt install gitgit config --global user.name "John Doe"git config --global user.email johndoe@example.comsudo apt install openssh-serversudo vim /etc/ssh/ssh_config #and change portsudo service ssh restartssh-keygen -o -f ~/.ssh/id_rsacat ~/.ssh/id_rsa.pub- Paste key into https://gitlab.com/profile/keys or wherever your git host is.
Nvidia driver.
Do this first, if nothing else, so you can stop looking at a 640x480 screen.
Install nvidia, cuda, and cudnn based on this.
sudo add-apt-repository ppa:graphics-drivers/ppasudo apt install nvidia-driver-410sudo apt-mark hold nvidia-driver-410sudo reboot
Cuda 10
wget https://developer.nvidia.com/compute/cuda/10.0/Prod/local_installers/cuda-repo-ubuntu1804-10-0-local-10.0.130-410.48_1.0-1_amd64sudo dpkg -i cuda-repo-ubuntu1804-10-0-local-10.0.130-410.48_1.0-1_amd64sudo apt-key add /var/cuda-repo-10-0-local-10.0.130-410.48/7fa2af80.pubsudo apt-get updatesudo apt-get install cudasudo apt-mark hold cudaecho "export PATH=/usr/local/cuda-10.0/bin${PATH:+:${PATH}}" >> ~/.bashrcsource ~/.bashrc
cuDNN
- Go to https://developer.nvidia.com/rdp/cudnn-download and create an account if you don't already have one. It's free.
- Click "Download cuDNN v7.6.0 (May 20, 2019), for CUDA 10.0"
- Download all 3 files with 18.04 in the name. Specifically the runtime library, developer library, and code samples.
cd Downloadssudo dpkg -i libcudnn7_7.6.0.64-1+cuda10.0_amd64.debsudo dpkg -i libcudnn7-dev_7.6.0.64-1+cuda10.0_amd64.debsudo dpkg -i libcudnn7-doc_7.6.0.64-1+cuda10.0_amd64.debsudo apt-mark hold libcudnn7 libcudnn7-dev libcudnn7-doc
Conda
Install conda based on this.
cd /tmpcurl -O https://repo.anaconda.com/archive/Anaconda3-2019.03-Linux-x86_64.shsha256sum Anaconda3-2019.03-Linux-x86_64.shbash Anaconda3-2019.03-Linux-x86_64.shsource ~/.bashrc
Tensorflow
conda create --name tensorflow_p37 python=3.7echo "alias p37='conda activate tensorflow_p37'" >> ~/.bashrcsource ~/.bashrcp37pip install matplotlibpip install numpypip install pillowpip install pathlibpip install shutilpip install ipythonpip install jupyterpip install sixpip install tensorboardpip install datetimepip install neptune-client
Then if you are running on a GPU...
pip install tensorflow-gpu
And if a CPU...
pip install tensorflow
Apps
- Slack
- Visual Studio Code
- TeamViewer
Work in progress.