tech:notes_docker_cuda_nvidia
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédente | |||
| tech:notes_docker_cuda_nvidia [2025/03/27 15:57] – Jean-Baptiste | tech:notes_docker_cuda_nvidia [2025/10/30 17:29] (Version actuelle) – Jean-Baptiste | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| + | {{tag> | ||
| + | |||
| + | # Notes Docker Cuda nvidia | ||
| + | |||
| + | Voir https:// | ||
| + | |||
| + | Voir aussi : | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | Installation nvidia-docker (old) | ||
| + | ~~~bash | ||
| + | distribution=$(. / | ||
| + | curl -s -L https:// | ||
| + | curl -s -L https:// | ||
| + | sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit | ||
| + | sudo systemctl restart docker | ||
| + | ~~~ | ||
| + | |||
| + | Test | ||
| + | ~~~bash | ||
| + | docker run -it --rm --gpus all ubuntu nvidia-smi | ||
| + | nvidia-docker run --rm hello-world | ||
| + | ~~~ | ||
| + | |||
| + | ## Install de CUDA Docker sous Debian avec les paquets .deb | ||
| + | |||
| + | |||
| + | Install nvidia drivers and cuda | ||
| + | |||
| + | Prereq | ||
| + | ~~~bash | ||
| + | wget http:// | ||
| + | wget http:// | ||
| + | dpkg -i screen-resolution-extra_0.17.1.1~16.04.1_all.deb python3-xkit_0.5.0ubuntu2_all.deb | ||
| + | apt-get install -f | ||
| + | ~~~ | ||
| + | |||
| + | Source : https:// | ||
| + | |||
| + | ~~~bash | ||
| + | wget https:// | ||
| + | sudo mv cuda-ubuntu1804.pin / | ||
| + | wget http:// | ||
| + | sudo dpkg -i cuda-repo-ubuntu1804-10-2-local-10.2.89-440.33.01_1.0-1_amd64.deb | ||
| + | sudo apt-key add / | ||
| + | sudo apt-get update | ||
| + | sudo apt-get -y install cuda | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | apt-get install build-essential binutils g++ mpich dkms libxmu-dev libxi-dev linux-headers-$(uname -r) linux-headers-amd64 | ||
| + | wget http:// | ||
| + | ~~~ | ||
| + | |||
| + | Install Docker | ||
| + | ~~~bash | ||
| + | wget http:// | ||
| + | wget http:// | ||
| + | wget http:// | ||
| + | dpkg -i libseccomp2_2.4.1-2~bpo10+1_amd64.deb runc_1.0.0~rc10+dfsg1-1_amd64.deb docker.io_19.03.5+dfsg1-2_amd64.deb | ||
| + | apt-get -f install | ||
| + | |||
| + | apt-get install docker-compose | ||
| + | |||
| + | mkdir / | ||
| + | cat <<EOF > / | ||
| + | [Service] | ||
| + | # Environment=" | ||
| + | Environment=" | ||
| + | |||
| + | EOF | ||
| + | |||
| + | systemctl daemon-reload | ||
| + | systemctl restart docker | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ## Autres | ||
| + | |||
| + | ~~~bash | ||
| + | ls -la /dev | grep nvidia | ||
| + | cat / | ||
| + | ~~~ | ||
| + | |||
