feat: enable NVIDIA GPU support in Docker Compose for Ollama service

This commit is contained in:
2026-02-18 09:40:16 +08:00
parent 451e7f9566
commit d21471ec59
2 changed files with 8 additions and 7 deletions
+1
View File
@@ -11,6 +11,7 @@ RUN apt-get update && apt-get install -y \
ca-certificates \
wget \
gnupg \
zstd \
&& rm -rf /var/lib/apt/lists/*
# Install Ollama
+7 -7
View File
@@ -15,13 +15,13 @@ services:
- OLLAMA_HOST=0.0.0.0
restart: unless-stopped
# Uncomment the following lines if you have NVIDIA GPU support
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: all
# capabilities: [gpu]
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
postgres:
image: docker.io/pgvector/pgvector:pg17