1
0
Fork 0

add nvidia version of docker compose spec

This commit is contained in:
Massaki Archambault 2024-02-07 22:55:21 -05:00
parent eead1c2268
commit 657ebae73c
1 changed files with 26 additions and 0 deletions

26
docker-compose.nvidia.yml Normal file
View File

@ -0,0 +1,26 @@
include:
- docker-compose.base.yml
services:
# Begin Ollama service
ollama:
image: ollama/ollama:0.1.23
restart: unless-stopped
entrypoint: /bootstrap.sh
command: mistral
env_file:
- .env
ports:
- 11434:11434
# begin for NVIDIA GPU support
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
# end of section for NVIDIA GPU support
volumes:
- ./ollama/bootstrap.sh:/bootstrap.sh:ro
- ./ollama:/root/.ollama