Skip to content

Instantly share code, notes, and snippets.

@rahduro
Last active October 21, 2019 17:43
Show Gist options
  • Save rahduro/2e48379de61425fab86e398d8c0d97b1 to your computer and use it in GitHub Desktop.
Save rahduro/2e48379de61425fab86e398d8c0d97b1 to your computer and use it in GitHub Desktop.

some basic setup after 18.04.2 install

sudo apt-get install build-essential cmake git unzip zip python-dev python3-dev python-pip python3-pip

sudo apt-get install linux-headers-$(uname -r)

for dropbox installation required

sudo apt install python-gpg

install dropbox, foxitreader, dropbox, spotify

if any previous version of cuda is installed remove them

sudo apt-get purge nvidia*

sudo apt-get autoremove

sudo apt-get autoclean

sudo rm -rf /usr/local/cuda*

download bazel version 0.18

https://github.com/bazelbuild/bazel/releases/tag/0.18.0

chmod +x bazel-<version>-installer-linux-x86_64.sh

./bazel-<version>-installer-linux-x86_64.sh --user

install graphics drivers, cuda 10, cudnn, nccl

Using runfile for both graphics driver and cuda is perferred

Download driver from here Nvidia Drivers

and Cuda from CUDA. When installing do not install driver just select every other options.

sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub

echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" | sudo tee /etc/apt/sources.list.d/cuda.list

sudo apt-get update

sudo apt-get -o Dpkg::Options::="--force-overwrite" install cuda-10-0 cuda-drivers

reboot and then add the following lines at the end of .bashrc

export PATH=/usr/local/cuda-10.0/bin${PATH:+:${PATH}}

export PATH=$HOME/bin${PATH:+:${PATH}}

export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRA$

export LD_LIBRARY_PATH=/usr/local/cuda/extras/CUPTI/lib64${LD_LIBRARY_PATH:+:${$

download CuDNN 7.4.2 from the following link https://developer.nvidia.com/compute/machine-learning/cudnn/secure/v7.4.2/prod/10.0_20181213/cudnn-10.0-linux-x64-v7.4.2.24.tgz and extract using tar zxvf <filename>, then copy the header and lib files using the following commands

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*

download NCCL from the following link https://developer.nvidia.com/compute/machine-learning/nccl/secure/v2.4/prod/nccl-repo-ubuntu1804-2.4.2-ga-cuda10.0_1-1_amd64.deb and install using sudo dpkg -i

download Anaconda for python 3.7

https://repo.anaconda.com/archive/Anaconda3-2018.12-Linux-x86_64.sh. and create an environment for tensorflow with python version 3.6.

building and installing tensorflow from source with CUDA 10

follow instructions at https://www.tensorflow.org/install/source

install youtube-dl

sudo apt install curl -y

sudo curl -L https://yt-dl.org/latest/youtube-dl -o /usr/bin/youtube-dl

sudo chmod 755 /usr/bin/youtube-dl

some important git settings for working across windows and linux

git config --global core.fileMode false

git config --global core.autocrlf true

git config --global core.ignorecase true

Or for locally changing git config core.fileMode false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment