mirror of
https://github.com/kevinthedang/discord-ollama.git
synced 2025-12-12 11:56:06 -05:00
Docker Container Setup (#15)
* minor package update and env * added docker scripts * added working docker compose * fixed docker container bridge
This commit is contained in:
45
docker-compose.yml
Normal file
45
docker-compose.yml
Normal file
@@ -0,0 +1,45 @@
|
||||
# creates the docker compose
|
||||
version: '3.7'
|
||||
|
||||
# build individual services
|
||||
services:
|
||||
# setup discord bot container
|
||||
discord:
|
||||
build: ./ # find docker file in designated path
|
||||
container_name: discord
|
||||
restart: always # rebuild container always
|
||||
environment:
|
||||
CLIENT_TOKEN: ${CLIENT_TOKEN}
|
||||
GUILD_ID: ${GUILD_ID}
|
||||
CHANNEL_ID: ${CHANNEL_ID}
|
||||
MODEL: ${MODEL}
|
||||
CLIENT_UID: ${CLIENT_UID}
|
||||
OLLAMA_IP: ${OLLAMA_IP}
|
||||
OLLAMA_PORT: ${OLLAMA_PORT}
|
||||
networks:
|
||||
- ollama-net
|
||||
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
|
||||
# runtime: nvidia # use Nvidia Container Toolkit for GPU support
|
||||
# devices:
|
||||
# - /dev/nvidia0
|
||||
volumes:
|
||||
- ollama:/root/.ollama
|
||||
ports:
|
||||
- 11434:11434
|
||||
|
||||
networks:
|
||||
ollama-net:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
ollama:
|
||||
discord:
|
||||
Reference in New Issue
Block a user