chore: add docker-compose for gpu setup
Signed-off-by: mudler <mudler@localai.io>
This commit is contained in:
74
docker-compose.gpu.yaml
Normal file
74
docker-compose.gpu.yaml
Normal file
@@ -0,0 +1,74 @@
|
||||
services:
|
||||
localai:
|
||||
# See https://localai.io/basics/container/#standard-container-images for
|
||||
# a list of available container images (or build your own with the provided Dockerfile)
|
||||
# Available images with CUDA, ROCm, SYCL, Vulkan
|
||||
# Image list (quay.io): https://quay.io/repository/go-skynet/local-ai?tab=tags
|
||||
# Image list (dockerhub): https://hub.docker.com/r/localai/localai
|
||||
image: localai/localai:latest-gpu-nvidia-cuda-12
|
||||
command:
|
||||
- qwen_qwq-32b
|
||||
- granite-embedding-107m-multilingual
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080/readyz"]
|
||||
interval: 10s
|
||||
timeout: 20m
|
||||
retries: 20
|
||||
ports:
|
||||
- 8081:8080
|
||||
environment:
|
||||
- DEBUG=true
|
||||
volumes:
|
||||
- ./volumes/models:/build/models:cached
|
||||
- ./volumes/images:/tmp/generated/images
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices:
|
||||
- driver: nvidia
|
||||
count: 1
|
||||
capabilities: [gpu]
|
||||
ragserver:
|
||||
image: quay.io/mudler/localrag
|
||||
ports:
|
||||
- 8080
|
||||
environment:
|
||||
- COLLECTION_DB_PATH=/db
|
||||
- EMBEDDING_MODEL=granite-embedding-107m-multilingual
|
||||
- FILE_ASSETS=/assets
|
||||
- OPENAI_API_KEY=sk-1234567890
|
||||
- OPENAI_BASE_URL=http://localai:8080
|
||||
volumes:
|
||||
- ./volumes/localrag/db:/db
|
||||
- ./volumes/localrag/assets/:/assets
|
||||
|
||||
ragserver-healthcheck:
|
||||
depends_on:
|
||||
ragserver:
|
||||
condition: service_started
|
||||
image: busybox
|
||||
command: ["sh", "-c", "until wget -q -O - http://ragserver:8080 > /dev/null 2>&1; do echo 'Waiting for ragserver...'; sleep 1; done; echo 'RagServer is up!'"]
|
||||
|
||||
localagent:
|
||||
depends_on:
|
||||
localai:
|
||||
condition: service_healthy
|
||||
ragserver-healthcheck:
|
||||
condition: service_completed_successfully
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.webui
|
||||
ports:
|
||||
- 8080:3000
|
||||
environment:
|
||||
- LOCALAGENT_MODEL=arcee-agent
|
||||
- LOCALAGENT_LLM_API_URL=http://localai:8080
|
||||
- LOCALAGENT_API_KEY=sk-1234567890
|
||||
- LOCALAGENT_LOCALRAG_URL=http://ragserver:8080
|
||||
- LOCALAGENT_STATE_DIR=/pool
|
||||
- LOCALAGENT_TIMEOUT=5m
|
||||
- LOCALAGENT_ENABLE_CONVERSATIONS_LOGGING=false
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
volumes:
|
||||
- ./volumes/localagent/:/pool
|
||||
@@ -1,6 +1,6 @@
|
||||
services:
|
||||
localai:
|
||||
# See https://localai.io/basics/getting_started/#container-images for
|
||||
# See https://localai.io/basics/container/#standard-container-images for
|
||||
# a list of available container images (or build your own with the provided Dockerfile)
|
||||
# Available images with CUDA, ROCm, SYCL, Vulkan
|
||||
# Image list (quay.io): https://quay.io/repository/go-skynet/local-ai?tab=tags
|
||||
|
||||
Reference in New Issue
Block a user