Skip to content

Instantly share code, notes, and snippets.

@chauhang
Last active December 4, 2019 22:18
Show Gist options
  • Save chauhang/83065374a4c98ac4d8720da8b50b009b to your computer and use it in GitHub Desktop.
Save chauhang/83065374a4c98ac4d8720da8b50b009b to your computer and use it in GitHub Desktop.
# Open AI Gym Render does not work with default NVidia OpenGL install. Use the steps below to install NVidia Drivers / Cuda without OpenGL
# Install Pre-req
sudo apt install gcc make
# Download installers
mkdir ~/Downloads/nvidia
cd ~/Downloads/nvidia
wget https://developer.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_418.87.00_linux.run
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/440.36/NVIDIA-Linux-x86_64-440.36.run
sudo chmod +x NVIDIA-Linux-x86_64-430.36.run
sudo chmod +x cuda_10.1.243_418.87.00_linux.run
./cuda_10.1.243_418.87.00_linux.run --extract=~/Downloads/nvidia/
# Uninstall old stuff
sudo apt-get --purge remove nvidia-*
sudo nvidia-uninstall
# Reboot
sudo shutdown -r now
# In grub boot menu hit `e` and add `nouveau.modeset=0` to the end of the line beginning with `linux`
# F10 to boot
# CTRL+ALT+F1 and log in
sudo systemctl stop lightdm
# Alternate mechanism if installing from remote
# Creat Blacklist for Nouveau Driver
#Create a file at /etc/modprobe.d/blacklist-nouveau.conf with the following contents:
blacklist nouveau
options nouveau modeset=0
sudo update-initramfs -u
# Reboot
sudo shutdown -r now
sudo ./NVIDIA-Linux-x86_64-440.36.run --no-opengl-files
sudo ./cuda_10.1.243_418.87.00_linux.run --no-opengl-libs
# Verify installation
nvidia-smi
cat /proc/driver/nvidia/version
export LD_LIBRARY_PATH=/usr/local/cuda-10.1/lib64\
${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
# Reboot for NVidia drivers to take effect
sudo shutdown -r now
# Start jupyter
xvfb-run -s "-screen 0 1400x900x24" jupyter notebook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment