Docker.md 1.2 KB
Newer Older
1
2
3
4
5
6
7
# Docker

## Prerequisites
* Docker must be installed and running on your system.
* Create a folder to store big models & intermediate files (ex. /mnt/models)

## Images
8
9
There is a Docker image available for our project, you can pull the docker image by:
```
10
docker pull approachingai/ktransformers:0.2.1
11
12
```
**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.
13
14
15
16
17
18

## Building docker image locally
 - Download Dockerfile in [there](../../Dockerfile)

 - finish, execute
   ```bash
19
   docker build  -t approachingai/ktransformers:0.2.1 .
20
21
22
23
24
25
   ```

## 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.
```
26
27
28
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
29
30
31
```

More operators you can see in the [readme](../../README.md)