Curso-lenguaje-python/catch-all/06_bots_telegram/09_ollama_bot/docker-compose.yml
2024-08-18 21:15:33 +02:00

43 lines
772 B
YAML

services:
ollama-tg:
build: .
container_name: ollama-tg
restart: on-failure
env_file:
- ./.env
networks:
- ollama-net
depends_on:
- ollama-api
ollama-api:
image: ollama/ollama:latest
container_name: ollama-server
volumes:
- ./ollama:/root/.ollama
networks:
- ollama-net
# Descomenta para habilitar la GPU de NVIDIA
# De lo contrario, se ejecuta solo en la CPU:
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: all
# capabilities: [gpu]
restart: always
ports:
- '11434:11434'
environment:
- OLLAMA_MODELS=/ollama/models
networks:
ollama-net:
driver: bridge