To get a consistent environment with fixed versions of proprietary programs like cudnn, cuda, bazel and other dependencies of tensorflow, dockers are convenient.
Here's a crash course.
container = an instance of an image, it runs. files that you need to save past the end of a container’s life should be kept in a shared folder. image = a immutable snapshot from a virtual machine image
docker image ls -a
(These two commands do the same)
docker ps -a docker container ls -a
docker start 3982cfe11658 docker attach 3982cfe11658 docker start -a 3982cfe11658
docker rm `docker ps -aq -f status=exited`
sudo docker run -it -w /jammy -v $PWD:/mnt -e HOST_PERMS="$(id -u):$(id -g)" rstudio/r-base:4.3-jammy bash
apt-get update apt-get install -y gnupg
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600 sudo apt-key del 7fa2af80 wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb dpkg -i cuda-keyring_1.0-1_all.deb apt-get update apt-get -y install —no-install-recommends cuda=11.8.0-1