From a1aefdb8f4d848c57a11c0d3b8059bd85e67c930 Mon Sep 17 00:00:00 2001 From: Wang Date: Mon, 9 Oct 2023 13:36:29 +0800 Subject: [PATCH] modify README --- docker/llm/inference/cpu/docker/README.md | 26 ++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/docker/llm/inference/cpu/docker/README.md b/docker/llm/inference/cpu/docker/README.md index 589fe32c..2712a9bd 100644 --- a/docker/llm/inference/cpu/docker/README.md +++ b/docker/llm/inference/cpu/docker/README.md @@ -37,8 +37,32 @@ To run inference using `BigDL-LLM` using cpu, you could refer to this [documenta chat.py can be used to initiate a conversation with a specified model. The file is under directory '/root'. -To run chat.py: +You can download models and bind the model directory from host machine to container when start a container. + +Here is an example: +```bash +export DOCKER_IMAGE=intelanalytics/bigdl-llm-cpu:2.4.0-SNAPSHOT +export MODEL_PATH=/home/llm/models + +sudo docker run -itd \ + --net=host \ + --cpuset-cpus="0-47" \ + --cpuset-mems="0" \ + --memory="32G" \ + --name=CONTAINER_NAME \ + --shm-size="16g" \ + -v $MODEL_PATH:/llm/models/ + $DOCKER_IMAGE + ``` + +After entering the container through `docker exec`, you can run chat.py by: +```bash cd /root python chat.py --model-path YOUR_MODEL_PATH ``` +In the example above, it can be: +```bash +cd /root +python chat.py --model-path /llm/models/MODEL_NAME +``` \ No newline at end of file