You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Note #2:** NVidia GPU CuBLAS support requires a NVidia GPU with sufficient VRAM (approximately as much as the size above) and Docker NVidia support (see [container-toolkit/install-guide](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html))
8
+
1
9
# Simple Dockerfiles for building the llama-cpp-python server with external model bin files
2
10
-`./openblas_simple/Dockerfile` - a simple Dockerfile for non-GPU OpenBLAS, where the model is located outside the Docker image
3
11
-`cd ./openblas_simple`
@@ -15,14 +23,14 @@
15
23
-`hug_model.py` - a Python utility for interactively choosing and downloading the latest `5_1` quantized models from [huggingface.co/TheBloke](https://huggingface.co/TheBloke)
16
24
-`Dockerfile` - a single OpenBLAS and CuBLAS combined Dockerfile that automatically installs a previously downloaded model `model.bin`
17
25
18
-
## Get model from Hugging Face
19
-
`python3 ./hug_model.py`
20
-
21
-
You should now have a model in the current directory and `model.bin` symlinked to it for the subsequent Docker build and copy step. e.g.
26
+
## Download a Llama Model from Hugging Face
27
+
- To download a MIT licensed Llama model run: `python3 ./hug_model.py -a vihangd -s open_llama_7b_700bt_ggml`
28
+
- To select and install a restricted license Llama model run: `python3 ./hug_model.py -a TheBloke -t llama`
29
+
-You should now have a model in the current directory and `model.bin` symlinked to it for the subsequent Docker build and copy step. e.g.
22
30
```
23
31
docker $ ls -lh *.bin
24
-
-rw-rw-r-- 1 user user 4.8G May 23 18:30 <downloaded-model-file>.q5_1.bin
25
-
lrwxrwxrwx 1 user user 24 May 23 18:30 model.bin -> <downloaded-model-file>.q5_1.bin
32
+
-rw-rw-r-- 1 user user 4.8G May 23 18:30 <downloaded-model-file>q5_1.bin
33
+
lrwxrwxrwx 1 user user 24 May 23 18:30 model.bin -> <downloaded-model-file>q5_1.bin
26
34
```
27
35
**Note #1:** Make sure you have enough disk space to download the model. As the model is then copied into the image you will need at least
28
36
**TWICE** as much disk space as the size of the model:
@@ -36,22 +44,15 @@ lrwxrwxrwx 1 user user 24 May 23 18:30 model.bin -> <downloaded-model-file>.q5
36
44
37
45
**Note #2:** If you want to pass or tune additional parameters, customise `./start_server.sh` before running `docker build ...`
38
46
39
-
# Install Docker Server
40
-
41
-
**Note #3:** This was tested with Docker running on Linux. If you can get it working on Windows or MacOS, please update this `README.md` with a PR!
Use if you don't have a NVidia GPU. Defaults to `python:3-slim-bullseye` Docker base image and OpenBLAS:
47
-
## Build:
48
-
`docker build --build-arg -t openblas .`
49
-
## Run:
49
+
###Build:
50
+
`docker build -t openblas .`
51
+
###Run:
50
52
`docker run --cap-add SYS_RESOURCE -t openblas`
51
53
52
-
# Use CuBLAS
53
-
Requires a NVidia GPU with sufficient VRAM (approximately as much as the size above) and Docker NVidia support (see [container-toolkit/install-guide](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html))
0 commit comments