From c393265fae8d2e23ff6495d4c6f95c5f6da96753 Mon Sep 17 00:00:00 2001 From: SanChuan <2194167956@qq.com> Date: Sun, 2 Jul 2023 12:41:39 +0800 Subject: [PATCH] fix docker run command in README.md add docker gpu command support, remove a useless whitespace in command --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 38d3d9a..5cf40a8 100644 --- a/README.md +++ b/README.md @@ -74,8 +74,12 @@ export PYTORCH_ENABLE_MPS_FALLBACK=1 Provided docker image is based on NGC PyTorch repository. To quickly try out visualizer in Docker, run the following: ```sh +# before you build the docker container, make sure you have cloned this repo, and downloaded the pretrained model by `python scripts/download_model.py`. docker build . -t draggan:latest -docker run -p 7860: 7860 -v "$PWD":/workspace/src -it draggan:latest bash +docker run -p 7860:7860 -v "$PWD":/workspace/src -it draggan:latest bash +# (Use GPU)if you want to utilize your Nvidia gpu to accelerate in docker, please add command tag `--gpus all`, like: +# docker run --gpus all -p 7860:7860 -v "$PWD":/workspace/src -it draggan:latest bash + cd src && python visualizer_drag_gradio.py --listen ``` Now you can open a shared link from Gradio (printed in the terminal console).