Skip to content

Instantly share code, notes, and snippets.

@mjkvaak
mjkvaak / TF2.x_with_GPU_on_ubuntu
Last active February 15, 2022 09:07
Installation of Tensorflow 2.X with GPU on Ubuntu 18.04/20.04 with conda and pip
# install nvidia-drivers: see gist.github.com/mjkvaak/5769ebdfbf6598b3fd0ece66b3c12a3c
# create conda environment
conda create --name myenv python=3.9 pip
conda activate myenv
# install cuda drivers
conda install -c anaconda cudatoolkit=11.3
conda install -c conda-forge cudnn
@mjkvaak
mjkvaak / nvidia_drivers_installation_on_ubuntu
Last active May 17, 2022 08:46
Painless installation of NVIDIA drivers on Ubuntu 18.04/20.04
# blacklist noveau drivers
sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
# confirm that the changes were correctly applied
cat /etc/modprobe.d/blacklist-nvidia-nouveau.conf
# prints:
# blacklist nouveau
# options nouveau modeset=0