Docker Basics
-
Build
sudo docker -t <target-name> -f Dockerfile .
-
Run
- With bash
sudo docker run --rm -it --device /dev/kfd --device /dev/dri --security-opt seccomp=unconfined <target-name> /bin/bash
- Without bash
sudo docker run --rm --device /dev/kfd --device /dev/dri --security-opt seccomp=unconfined rochpl.6.0 mpirun_rochpl -P 1 -Q 1 -N 45312
- Mount a Directory
sudo docker run --rm -it --device /dev/kfd --device /dev/dri --security-opt seccomp=unconfined --network host --name rochpl_node -v <directory>:/opt rochpl /usr/sbin/sshd -D
- With bash
-
Update Docker
- commit the changes
docker ps # to get the container id
docker commit <containerID> <imageid>
- commit the changes
-
Clean
# remove all images sudo docker system prune -a sudo docker container prune sudo docker buildx prune -f