An Ubuntu 20.04 image with glearn python package built with NVIDIA CUDA Toolkit 11.4 support.
docker pull sameli/glearn
To run the container and open python interpreter directly at startup:
docker run -it sameli/glearn
This also imports glearn package automatically.
To run the container and open ipython interpreter directly at startup:
docker run -it sameli/glearn ipython
This also imports glearn package automatically.
To open bash shell only:
docker run -it --entrypoint /bin/bash sameli/glearn
To mount the host directory /home/user/project on the docker's container directory /root, use:
docker run -it -v /home/user/project:/root sameli/glearn
To access host's GPU device from the container, install Nvidia Container Toolkit as follows.
Add the package to the repository:
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
Install nvidia-contaner-toolkit by:
sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit
Restart docker to be able to use it:
sudo systemctl restart docker
To use host's GPU, add --gpus all to any of the docker commands given before, such as:
docker run --gpus all -it sameli/glearn
To check the host's Nvidia driver version, CUDA runtime library version, and list of available GPU devices, run nvida-smi command, such as by:
docker run --gpus all sameli/glearn nvidia-smi
/usr/local/cuda/usr/bin/python3ipython, jupytervimtexlive)Content type
Image
Digest
sha256:e911b5816…
Size
1 GB
Last updated
over 2 years ago
docker pull sameli/glearn