Files
discord-ollama/docker-compose.yml
Kevin Dang 6ac45afb13 Streamlined Preferences Setup and Default Model (#148)
* Update: Streamlinded setup and Default Model

* Update: version increment
2024-12-11 17:53:35 -08:00

52 lines
1.3 KiB
YAML

# creates the docker compose
# build individual services
services:
# setup discord bot container
discord:
build: ./ # find docker file in designated path
container_name: discord
restart: always # rebuild container always
image: kevinthedang/discord-ollama:0.7.4
environment:
CLIENT_TOKEN: ${CLIENT_TOKEN}
OLLAMA_IP: ${OLLAMA_IP}
OLLAMA_PORT: ${OLLAMA_PORT}
networks:
ollama-net:
ipv4_address: ${DISCORD_IP}
volumes:
- discord:/src/app # docker will not make this for you, make it yourself
# setup ollama container
ollama:
image: ollama/ollama:latest # build the image using ollama
container_name: ollama
restart: always
networks:
ollama-net:
ipv4_address: ${OLLAMA_IP}
runtime: nvidia # use Nvidia Container Toolkit for GPU support
devices:
- /dev/nvidia0
volumes:
- ollama:/root/.ollama
ports:
- ${OLLAMA_PORT}:${OLLAMA_PORT}
# Put Redis Container here?
# create a network that supports giving addresses withing a specific subnet
networks:
ollama-net:
driver: bridge
ipam:
driver: default
config:
- subnet: ${SUBNET_ADDRESS}/16
volumes:
ollama:
discord: