This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
18 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM docker.io/ollama/ollama:latest | ||
|
||
RUN <<EOF | ||
# Start Ollama | ||
nohup ollama serve & | ||
|
||
# Wait for Ollama to start | ||
sleep 15 | ||
|
||
# Pull model | ||
ollama pull llama3 | ||
|
||
# Kill Ollama process | ||
kill -9 $(ps aux | grep "ollama" | grep -v "grep" | awk '{print $2}') | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,8 @@ | ||
--- | ||
version: '3.8' | ||
|
||
services: | ||
ollama: | ||
image: ollama/ollama | ||
# image: docker.io/ollama/ollama:latest | ||
build: | ||
dockerfile: ./Dockerfile.ollama | ||
ports: | ||
- 11434:11434 | ||
# command: > | ||
# echo "Starting Ollama server..." | ||
# ollama serve & | ||
# ollama run llama3 | ||
|
||
|
||
# echo "Waiting for Ollama server to be active..." | ||
# while [ "$(ollama list | grep 'NAME')" == "" ]; do | ||
# sleep 1 | ||
# done | ||
|
||
# command: "ollama pull llama3" | ||
# volumes: | ||
# - ./data:/app/data | ||
# environment: | ||
# - ENV_VARIABLE=value | ||
# healthcheck: | ||
# test: ["CMD", "curl", "-f", "http://localhost:11434/health"] | ||
# interval: 30s | ||
# timeout: 10s | ||
# retries: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters