mirror of
https://github.com/imartinez/privateGPT.git
synced 2025-04-28 03:32:18 +00:00
feat: add new cuda profile
This commit is contained in:
parent
1e82ac9d6f
commit
23704d23ad
@ -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 --------------
|
||||
#-----------------------------------
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user