Skip to content

[feature] update docker image and entrypoint #317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Loading