From 0e4b7a3929e12d1645e3e177148d15cd4cdec793 Mon Sep 17 00:00:00 2001 From: chenxl Date: Sat, 15 Feb 2025 07:55:33 +0000 Subject: [PATCH] [feature] update docker image and entrypoint --- Dockerfile | 2 +- doc/en/Docker.md | 8 +++++--- ktransformers/__init__.py | 6 +++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index d56a607f..6d4b2147 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,4 +32,4 @@ CPU_INSTRUCT=NATIVE KTRANSFORMERS_FORCE_BUILD=TRUE TORCH_CUDA_ARCH_LIST="8.0;8. pip cache purge EOF -ENTRYPOINT [ "/opt/conda/bin/ktransformers" ] \ No newline at end of file +ENTRYPOINT ["tail", "-f", "/dev/null"] \ No newline at end of file diff --git a/doc/en/Docker.md b/doc/en/Docker.md index 56b2520c..f31c3b5e 100644 --- a/doc/en/Docker.md +++ b/doc/en/Docker.md @@ -7,7 +7,7 @@ ## Images There is a Docker image available for our project, you can pull the docker image by: ``` -docker pull approachingai/ktransformers:0.1.1 +docker pull approachingai/ktransformers:0.2.1 ``` **Notice**: In this image, we compile the ktransformers in AVX512 instuction CPUs, if your cpu not support AVX512, it is suggested to recompile and install ktransformer in the /workspace/ktransformers directory within the container. @@ -16,14 +16,16 @@ docker pull approachingai/ktransformers:0.1.1 - finish, execute ```bash - docker build -t approachingai/ktransformers:v0.1.1 . + docker build -t approachingai/ktransformers:0.2.1 . ``` ## Usage Assuming you have the [nvidia-container-toolkit](https://github.com/NVIDIA/nvidia-container-toolkit) that you can use the GPU in a Docker container. ``` -docker run --gpus all -v /path/to/models:/models -p 10002:10002 approachingai/ktransformers:v0.1.1 --port 10002 --gguf_path /models/path/to/gguf_path --model_path /models/path/to/model_path --web True +docker run --gpus all -v /path/to/models:/models --name ktransformers -itd approachingai/ktransformers:0.2.1 +docker exec -it ktransformers /bin/bash +python -m ktransformers.local_chat --gguf_path /models/path/to/gguf_path --model_path /models/path/to/model_path --cpu_infer 33 ``` More operators you can see in the [readme](../../README.md) \ No newline at end of file diff --git a/ktransformers/__init__.py b/ktransformers/__init__.py index 8c5108b2..44a2817b 100644 --- a/ktransformers/__init__.py +++ b/ktransformers/__init__.py @@ -5,7 +5,7 @@ Author : kkk1nak0 Date : 2024-08-15 07:34:46 Version : 1.0.0 -LastEditors : unicornchan -LastEditTime : 2025-02-10 00:59:53 +LastEditors : chenxl +LastEditTime : 2025-02-15 03:53:02 ''' -__version__ = "0.2.0" \ No newline at end of file +__version__ = "0.2.1" \ No newline at end of file