Skip to content

Commit

Permalink
Merge pull request #317 from kvcache-ai/develop-0.2.1
Browse files Browse the repository at this point in the history
[feature] update  docker image and entrypoint
  • Loading branch information
UnicornChan authored Feb 15, 2025
2 parents 718a71b + 0e4b7a3 commit 65d73ea
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
ENTRYPOINT ["tail", "-f", "/dev/null"]
8 changes: 5 additions & 3 deletions doc/en/Docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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)
6 changes: 3 additions & 3 deletions ktransformers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
__version__ = "0.2.1"

0 comments on commit 65d73ea

Please sign in to comment.