Install CUDA 10 on Ubuntu 18.04

You were probably thinking that this was going to be a long post. You're in luck. All you need to do is to install Ubuntu 18.04 and then Lambda Stack. Here's the code for that:

LAMBDA_REPO=$(mktemp) && \
wget -O${LAMBDA_REPO} https://lambdalabs.com/static/misc/lambda-stack-repo.deb && \
sudo dpkg -i ${LAMBDA_REPO} && rm -f ${LAMBDA_REPO} && \
sudo apt-get update && sudo apt-get install -y lambda-stack-cuda

That's literally all you need to do. Now go grab yourself a can of Monster and get back to work.

This is all you need for Titan RTX and 2080 Ti (Turing) GPU support.

Also, if you want a quick and dirty way to install CUDA 10 without using Lambda Stack use this gist (https://gist.github.com/bogdan-kulynych/f64eb148eeef9696c70d485a76e42c3a):

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb \
    && sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub \
    && sudo apt-get update \
    && sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb \
    && sudo apt-get update \
    && sudo apt-get install -y cuda

This will install the NVIDIA Driver version 410 and CUDA 10. Simple enough.

!-- Intercom -->