From aaa6c3aa1dd164f9031d67af9b99ee943567a580 Mon Sep 17 00:00:00 2001 From: Mocax <776307508@QQ.COM> Date: Fri, 25 Aug 2023 09:08:56 +0800 Subject: [PATCH] Fix the starting command of docker. (#2357) To prevent abusing of root privilege, please use custom user privilege to start. If not, sometimes the Docker images may be started with the permissions of root or other users. If you modify the mounted files in the container , it will cause permission errors or other errors. Co-authored-by: Matthew Tancik --- docs/quickstart/installation.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/quickstart/installation.md b/docs/quickstart/installation.md index 98b638b4d..55cee8f1e 100644 --- a/docs/quickstart/installation.md +++ b/docs/quickstart/installation.md @@ -169,6 +169,7 @@ The docker container can be launched with an interactive terminal where nerfstud ```bash docker run --gpus all \ # Give the container access to nvidia GPU (required). + -u $(id -u) \ # To prevent abusing of root privilege, please use custom user privilege to start. -v /folder/of/your/data:/workspace/ \ # Mount a folder from the local machine into the container to be able to process them (required). -v /home//.cache/:/home/user/.cache/ \ # Mount cache folder to avoid re-downloading of models everytime (recommended). -p 7007:7007 \ # Map port from local machine to docker container (required to access the web interface/UI). @@ -185,7 +186,7 @@ docker run --gpus all \ # Give the conta Besides, the container can also directly be used by adding the nerfstudio command to the end. ```bash -docker run --gpus all -v /folder/of/your/data:/workspace/ -v /home//.cache/:/home/user/.cache/ -p 7007:7007 --rm -it --shm-size=12gb # Parameters. +docker run --gpus all -u $(id -u) -v /folder/of/your/data:/workspace/ -v /home//.cache/:/home/user/.cache/ -p 7007:7007 --rm -it --shm-size=12gb # Parameters. dromni/nerfstudio: \ # Docker image name ns-process-data video --data /workspace/video.mp4 # Smaple command of nerfstudio. ```