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

Commit

Permalink
🐛 Fix Development Container (#16)
Browse files Browse the repository at this point in the history
🔧 Add Dockerfile
  • Loading branch information
Gary-H9 authored Jul 15, 2024
1 parent acadd6d commit ebc4835
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 27 deletions.
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

0 comments on commit ebc4835

Please sign in to comment.