docker build -t ubuntu_rolling_image .
docker run -d -it --name ubuntu-rolling -v /home/sonul:/home/ubuntu --user ubuntu ubuntu_rolling_image zsh
docker exec -it <container_id> zsh
docker ps -a
docker stop $(docker ps -q)
docker rm -f <container_id>
docker start my_container
docker run -it --rm --privileged --net=host -e DISPLAY=$DISPLAY -e WAYLAND_DISPLAY=$WAYLAND_DISPLAY -e XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR --name ubuntu-rolling --user=$(id -u):$(id -g) -v /home/sonul/Documents/docker/InsideDocker/home/ubuntu:/home/ubuntu -v /run/user/$(id -u):/run/user/1000 -v /tmp:/tmp ubuntu_rolling_image zsh
- for running gui apps and audio do this in docker container:
sudo chown -R 1000:1000 /run/user/1000/*
- For running nvidia in docker, follow this (link][https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html] and after setup use
--gpus=all
indocker run
Created
January 2, 2025 13:05
-
-
Save sonulohani/baa020edaffbf6d4657ecbefd76595a7 to your computer and use it in GitHub Desktop.
Docker
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment