feat: add new cuda profile

This commit is contained in:
Javier Martinez 2024-08-05 17:48:14 +02:00
parent 1e82ac9d6f
commit 23704d23ad
No known key found for this signature in database
2 changed files with 35 additions and 0 deletions

View File

@ -48,6 +48,26 @@ services:
profiles:
- llamacpp-cpu
# Private-GPT service for the local mode (with CUDA support)
# This service builds from a local Dockerfile and runs the application in local mode.
private-gpt-llamacpp-cuda:
image: ${PGPT_IMAGE:-zylonai/private-gpt}${PGPT_TAG:-0.6.1}-llamacpp-cuda
build:
context: .
dockerfile: Dockerfile.llamacpp-cuda
volumes:
- ./local_data/:/home/worker/app/local_data
- ./models/:/home/worker/app/models
entrypoint: sh -c ".venv/bin/python scripts/setup && .venv/bin/python -m private_gpt"
ports:
- "8001:8001"
environment:
PORT: 8001
PGPT_PROFILES: local
HF_TOKEN: ${HF_TOKEN}
profiles:
- llamacpp-cuda
#-----------------------------------
#---- Ollama services --------------
#-----------------------------------

View File

@ -82,6 +82,21 @@ HF_TOKEN=<your_hf_token> docker-compose --profile llamacpp-cpu up
```
Replace `<your_hf_token>` with your actual Hugging Face token.
#### 2. LlamaCPP CUDA
**Description:**
This profile runs the Private-GPT services locally using `llama-cpp` and Hugging Face models.
**Requirements:**
A **Hugging Face Token (HF_TOKEN)** is required for accessing Hugging Face models. Obtain your token following [this guide](/installation/getting-started/troubleshooting#downloading-gated-and-private-models).
**Run:**
Start the services with your Hugging Face token using pre-built images:
```sh
HF_TOKEN=<your_hf_token> docker-compose --profile llamacpp-cuda up
```
Replace `<your_hf_token>` with your actual Hugging Face token.
## Building Locally
If you prefer to build Docker images locally, which is useful when making changes to the codebase or the Dockerfiles, follow these steps: