From b0f30fdbb055e9fd81900e176650a7ea90f19eda Mon Sep 17 00:00:00 2001 From: ortizcruz Date: Thu, 21 Sep 2023 15:31:45 +0200 Subject: [PATCH] readme docker update --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4267659..ae2eea6 100644 --- a/README.md +++ b/README.md @@ -109,15 +109,26 @@ Run the following to view all available options: After you have installed Docker, you can execute the following commands in the terminal. ``` -sudo docker build . --build-arg="hf_token=[enter your HuggingFace token] " --no-cache -t [image name] +sudo docker build . --build-arg="hf_token=[enter your HuggingFace token] " -t [image name] -sudo docker run --rm -it -p 7860:7860 --name [container name][image name] --hf_token [enter your HuggingFace token] --start_server +sudo docker run -it -p 7860:7860 --name [container name][image name] --hf_token [enter your HuggingFace token] --start_server ``` + `-p`: Flag for connecting the container interal port to the port on your local machine. + `--hf_token`: Flag for entering your personal HuggingFace token in the container. + `--start_server`: Command to start the Gradio App. + Then click the following link to run the app: http://0.0.0.0:7860 +- Enabling GPU usage + +``` +sudo docker run -it -p 7860:7860 --gpus all --name [container name][image name] --hf_token [enter your HuggingFace token] --start_server +``` +For further guidance check: https://blog.roboflow.com/use-the-gpu-in-docker/ + ## Documentation