Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

🐛 Fix Development Container #16

Merged
merged 1 commit into from
Jul 15, 2024
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
15 changes: 15 additions & 0 deletions contrib/Dockerfile.ollama
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
27 changes: 3 additions & 24 deletions contrib/docker-compose-ollama.yml
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
3 changes: 0 additions & 3 deletions scripts/devcontainer/post-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ docker compose --file contrib/docker-compose-postgres.yml up --detach
# Start Ollama Container
docker compose --file contrib/docker-compose-ollama.yml up --detach

# Start Ollama Model
docker exec -it contrib-ollama-1 ollama run llama3 &

# Upgrade Pip
pip install --break-system-package --upgrade pip

Expand Down
Loading