Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ services:
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: postgres
SELF_AI_URL: http://ollama:11434/api/chat
SELF_AI_MODEL: gemma3:4b
networks:
- self_network

Expand Down Expand Up @@ -42,6 +43,17 @@ services:
- NVIDIA_VISIBLE_DEVICES=all
networks:
- self_network
depends_on:
- ollama-init

ollama-init:
image: ollama/ollama:0.11.4
container_name: ollama-init
restart: "no"
volumes:
- ollama:/root/.ollama
- ./ollama-entrypoint.sh:/entrypoint.sh
entrypoint: ["/usr/bin/bash", "/entrypoint.sh"]

networks:
self_network:
Expand Down
8 changes: 8 additions & 0 deletions ollama-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

ollama serve &
sleep 5
ollama pull gemma3:4b &
pull_pid=$!
wait $pull_pid
sleep 5