Sign inSign up

mhadhbixissam/ubuntu

By mhadhbixissam

Updated 11 months ago

Image
0

3.4K

mhadhbixissam/ubuntu repository overview

* CPU :

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"   

* GPU :

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"  

* Configure local machine for GPU on docker :

Check nvidia drivers are installed :
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

Install nvidia docker run-time on you machine :
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

Tag summary

Content type

Image

Digest

sha256:787dcee62

Size

613.9 MB

Last updated

11 months ago

docker pull mhadhbixissam/ubuntu:vnc