From f029cb2aa536b18a86753fd9aaabd20b5eb399fb Mon Sep 17 00:00:00 2001 From: ZiniuYu Date: Wed, 22 Feb 2023 17:53:38 +0800 Subject: [PATCH] docs: update docker usage --- docs/user-guides/server.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/docs/user-guides/server.md b/docs/user-guides/server.md index ec0384d9a..4a1d5a574 100644 --- a/docs/user-guides/server.md +++ b/docs/user-guides/server.md @@ -591,9 +591,21 @@ The build argument `--build-arg GROUP_ID=$(id -g ${USER}) --build-arg USER_ID=$( ### Run +````{tab} PyTorch ```bash docker run -p 51009:51000 -v $HOME/.cache:/home/cas/.cache --gpus all jinaai/clip-server ``` +```` +````{tab} ONNX +```bash +docker run -p 51009:51000 -v $HOME/.cache:/home/cas/.cache --gpus all jinaai/clip-server:master-onnx onnx-flow.yml +``` +```` +````{tab} TensorRT +```bash +docker run -p 51009:51000 -v $HOME/.cache:/home/cas/.cache --gpus all jinaai/clip-server:master-tensorrt tensorrt-flow.yml +``` +```` Here, `51009` is the public port on the host and `51000` is the {ref}`in-container port defined inside YAML`. The argument `-v $HOME/.cache:/home/cas/.cache` leverages host's cache and prevents you to download the same model next time on start. @@ -601,11 +613,23 @@ Due to the limitation of the terminal inside Docker container, you will **not** To pass a YAML config from the host, one can do: +````{tab} PyTorch ```bash cat my.yml | docker run -i -p 51009:51000 -v $HOME/.cache:/home/cas/.cache --gpus all jinaai/clip-server -i ``` +```` +````{tab} ONNX +```bash +cat my.yml | docker run -i -p 51009:51000 -v $HOME/.cache:/home/cas/.cache --gpus all jinaai/clip-server:master-onnx -i +``` +```` +````{tab} TensorRT +```bash +cat my.yml | docker run -i -p 51009:51000 -v $HOME/.cache:/home/cas/.cache --gpus all jinaai/clip-server:master-tensorrt -i +``` +```` -The CLI usage is the same {ref}`as described here `. +The CLI usage is the same {ref}`as described here `. ```{tip} You can enable debug logging via: `docker run --env JINA_LOG_LEVEL=debug ...`