Skip to content

Commit

Permalink
fix(docker-compose): use restart policy rather than random sleep
Browse files Browse the repository at this point in the history
Signed-off-by: Rodney Osodo <[email protected]>
  • Loading branch information
rodneyosodo committed Oct 9, 2024
1 parent f71df87 commit 27062e2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docker/ollama-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ services:
pull-tinyllama:
image: docker:27.3.1
container_name: pull-tinyllama
restart: on-failure
depends_on:
- ollama
entrypoint: /bin/sh
command: -c "sleep 10 && docker exec ollama ollama run tinyllama:1.1b"
command: -c "docker exec ollama ollama run tinyllama:1.1b"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
Expand All @@ -62,10 +63,11 @@ services:
pull-starcoder2:
image: docker:27.3.1
container_name: pull-starcoder2
restart: on-failure
depends_on:
- ollama
entrypoint: /bin/sh
command: -c "sleep 10 && docker exec ollama ollama pull starcoder2:3b"
command: -c "docker exec ollama ollama pull starcoder2:3b"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
Expand All @@ -74,10 +76,11 @@ services:
pull-nomic-embed-text:
image: docker:27.3.1
container_name: pull-nomic-embed-text
restart: on-failure
depends_on:
- ollama
entrypoint: /bin/sh
command: -c "sleep 10 && docker exec ollama ollama pull nomic-embed-text:v1.5"
command: -c "docker exec ollama ollama pull nomic-embed-text:v1.5"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
Expand Down

0 comments on commit 27062e2

Please sign in to comment.