docker pull mhadhbixissam/ubuntu:light
services:
container:
image: mhadhbixissam/ubuntu:light
container_name: light
environment:
- GIT_USER=example
- [email protected]
- GIT_TOKEN=glpat-example
- PORT=6200
network_mode: "host"
it has conda and pytorch installed with runing vscode web :
docker pull mhadhbixissam/ubuntu:gpu
services:
container :
image: mhadhbixissam/ubuntu:gpu
container_name: gpuubuntu
environment:
- GIT_USER=example
- [email protected]
- GIT_TOKEN=glpat-example
- PORT=6201
- CONDA_DEFAULT_ENV=gpu
network_mode: "host"
nvidia-smi -a
if not working try :
sudo apt-get install linux-headers-$(uname -r)
distribution=$(. /etc/os-release;echo $ID$VERSION_ID | sed -e 's/\.//g')
wget https://developer.download.nvidia.com/compute/cuda/repos/$distribution/x86_64/cuda-keyring_1.0-1_all.deb
sudo dpkg -i cuda-keyring_1.0-1_all.deb
sudo apt-get update
sudo apt-get -y install cuda-drivers
Note : Reboot your os after this installation
curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey | sudo apt-key add -
distribution="ubuntu22.04"
curl -s -L https://nvidia.github.io/nvidia-container-runtime/$distribution/nvidia-container-runtime.list | sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list
sudo apt-get update
sudo apt-get install -y nvidia-container-toolkit
echo -e '{\n "default-runtime": "nvidia",\n "runtimes": {\n "nvidia": {\n "path": "/usr/bin/nvidia-container-runtime",\n "runtimeArgs": []\n }\n }\n}' > /etc/docker/daemon.json
sudo systemctl restart docker
Verify nvidia is setup for the docker :
sudo docker info | grep Runtime
Content type
Image
Digest
sha256:787dcee62…
Size
613.9 MB
Last updated
11 months ago
docker pull mhadhbixissam/ubuntu:vnc