Skip to content

Commit f63f3d1

Browse files
committed
🌸 Gardening.
1 parent 4cae6ec commit f63f3d1

File tree

12 files changed

+59
-37
lines changed

12 files changed

+59
-37
lines changed

.docker/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ cd pi-genai-stack
4242
git pull
4343
```
4444

45+
4546
## Blog posts
4647

4748
- Host Ollama and TinyDolphin LLM on a Pi5 with Docker Compose: [Run Ollama on a Pi5](https://k33g.hashnode.dev/run-ollama-on-a-pi5)

compose.yaml

Lines changed: 9 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,11 @@
1-
services:
2-
# https://cheshirecat.ai/local-models-with-ollama/
3-
ollama-service:
4-
container_name: ollama_pi_local
5-
image: ollama/ollama:latest
6-
volumes:
7-
- ./ollama:/root/.ollama
8-
ports:
9-
- 11434:11434
1+
include:
2+
# Start Ollama
3+
- ollama-runtime/ollama.yaml
4+
# Download LLMs
5+
- models/tinydolphin-llm.yaml
6+
#- models/phi-llm.yaml
7+
#- models/orca-mini-7b-llm.yaml
108

11-
download-model:
12-
image: curlimages/curl:8.6.0
13-
entrypoint: ["curl", "ollama-service:11434/api/pull", "-d", '{"name": "tinydolphin"}']
14-
# You can use other models
15-
#entrypoint: ["curl", "ollama-service:11434/api/pull", "-d", '{"name": "phi"}']
16-
#entrypoint: ["curl", "ollama-service:11434/api/pull", "-d", '{"name": "orca-mini:7b"}']
17-
depends_on:
18-
ollama-service:
19-
condition: service_started
9+
# Start GenAI application demo
10+
- python-demo/app.yaml
2011

21-
# 🚧 This is a work in progress
22-
# more samples to come
23-
python-environment:
24-
build:
25-
context: ./.docker/langchain-python
26-
dockerfile: Dockerfile
27-
container_name: python-demo
28-
depends_on:
29-
ollama-service:
30-
condition: service_started
31-
environment:
32-
- OLLAMA_BASE_URL=http://ollama-service:11434
33-
volumes:
34-
- ./python-demo:/python-demo
35-
ports:
36-
- 8000:8000

connect.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
2-
docker exec --workdir /python-demo -it python-demo /bin/bash
2+
docker exec --mount /python-demo -it python-demo /bin/bash
33

44

models/orca-mini-7b-llm.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
services:
2+
download-orca-mini-7b-llm:
3+
image: curlimages/curl:8.6.0
4+
entrypoint: ["curl", "ollama-service:11434/api/pull", "-d", '{"name": "orca-mini:7b"}']
5+
depends_on:
6+
ollama-service:
7+
condition: service_started

models/phi-llm.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
services:
2+
download-phi-llm:
3+
image: curlimages/curl:8.6.0
4+
entrypoint: ["curl", "ollama-service:11434/api/pull", "-d", '{"name": "phi"}']
5+
depends_on:
6+
ollama-service:
7+
condition: service_started

models/tinydolphin-llm.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
services:
2+
download-tinydolphin-llm:
3+
image: curlimages/curl:8.6.0
4+
entrypoint: ["curl", "ollama-service:11434/api/pull", "-d", '{"name": "tinydolphin"}']
5+
depends_on:
6+
ollama-service:
7+
condition: service_started

ollama-runtime/ollama.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
services:
2+
# https://cheshirecat.ai/local-models-with-ollama/
3+
ollama-service:
4+
container_name: ollama_pi_local
5+
image: ollama/ollama:latest
6+
volumes:
7+
- ./ollama:/root/.ollama
8+
ports:
9+
- 11434:11434
10+
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
FROM langchain/langchain
22

33
WORKDIR /app
4-
54
RUN <<EOF
65
apt-get update
76
apt-get install -y build-essential curl software-properties-common

python-demo/app.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
services:
2+
# 🚧 This is a work in progress
3+
# more samples to come
4+
python-environment:
5+
build:
6+
context: .
7+
dockerfile: Dockerfile
8+
container_name: python-demo
9+
depends_on:
10+
ollama-service:
11+
condition: service_started
12+
environment:
13+
- OLLAMA_BASE_URL=http://ollama-service:11434
14+
volumes:
15+
- ../python-demo:/python-demo
16+
ports:
17+
- 8000:8000

0 commit comments

Comments
 (0)