43 lines
772 B
YAML
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
|