Skip to content

Commit 2322bc0

Browse files
committed
🎉 Begin a project.
1 parent 5dd9b50 commit 2322bc0

16 files changed

+526
-1
lines changed

.docker/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Dockerfiles
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM langchain/langchain
2+
3+
WORKDIR /app
4+
5+
RUN <<EOF
6+
apt-get update
7+
apt-get install -y build-essential curl software-properties-common
8+
rm -rf /var/lib/apt/lists/*
9+
EOF
10+
11+
COPY requirements.txt .
12+
COPY index.html .
13+
14+
RUN pip install --upgrade -r requirements.txt
15+
16+
ENTRYPOINT [ "python3", "-m", "http.server", "8000" ]
17+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<html>
2+
<head>
3+
<meta charset="utf-8">
4+
<title>Little GenAI Stack</title>
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<style>
7+
.container { min-height: 100vh; display: flex; justify-content: center; align-items: center; text-align: center; }
8+
.title { font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif; display: block; font-weight: 300; font-size: 100px; color: #35495e; letter-spacing: 1px; }
9+
.subtitle { font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif; font-weight: 300; font-size: 42px; color: #526488; word-spacing: 5px; padding-bottom: 15px; }
10+
.links { padding-top: 15px; }
11+
</style>
12+
</head>
13+
14+
<body>
15+
<section class="container">
16+
<div>
17+
<h1 class="title">👋 Little GenAI 🦙🦜🔗 Stack 🤖</h1>
18+
<h2 class="subtitle">🚧 WIP</h2>
19+
<h2 class="subtitle">Served with 🐳 Docker</h2>
20+
</div>
21+
</section>
22+
</body>
23+
24+
</html>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
openai
2+
ollama
3+
langchain
4+
langchain-openai
5+
langchain-community
6+
chromadb

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ollama
2+
Icon

.vscode/extensions.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"pkief.material-icon-theme",
4+
"pkief.material-product-icons",
5+
"equinusocio.vsc-material-theme",
6+
]
7+
}

.vscode/settings.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"workbench.iconTheme": "material-icon-theme",
3+
"workbench.colorTheme": "Catppuccin Macchiato",
4+
"editor.fontSize": 14,
5+
"terminal.integrated.fontSize": 14
6+
,
7+
"editor.insertSpaces": true,
8+
"editor.tabSize": 4,
9+
"editor.detectIndentation": true,
10+
"go.lintTool": "golint",
11+
"files.autoSave": "afterDelay",
12+
"files.autoSaveDelay": 1000,
13+
"[go]": {
14+
"editor.insertSpaces": true,
15+
"editor.tabSize": 4,
16+
"editor.formatOnSave": true,
17+
"editor.defaultFormatter": "golang.go"
18+
19+
}
20+
}

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,21 @@
1-
# pi-genai-stack
1+
# pi-genai-stack
2+
3+
Use the following command:
4+
5+
```bash
6+
docker compose up
7+
```
8+
9+
> 👋 one of the services (from the compose file) will tell Ollama to download the `tinydolphin` model, then all the samples of the demo will use this model.
10+
11+
## Run the samples of the demo
12+
13+
Use the `python` with the interactive mode:
14+
```bash
15+
docker exec --workdir /python-demo -it python-demo /bin/bash
16+
```
17+
18+
Run a python file:
19+
```bash
20+
python3 hello.py
21+
```

compose.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+
expose:
9+
- 11434
10+
11+
download-model:
12+
image: curlimages/curl:8.6.0
13+
# use Ollama into a container
14+
entrypoint: ["curl", "ollama-service:11434/api/pull", "-d", '{"name": "tinydolphin"}']
15+
# use Ollama, installed locally on the host, from a container
16+
#entrypoint: ["curl", "http://host.docker.internal:11434/api/pull", "-d", '{"name": "tinydolphin"}']
17+
depends_on:
18+
ollama-service:
19+
condition: service_started
20+
21+
python-environment:
22+
build:
23+
context: ./.docker/langchain-python
24+
dockerfile: Dockerfile
25+
container_name: python-demo
26+
depends_on:
27+
ollama-service:
28+
condition: service_started
29+
environment:
30+
- OLLAMA_BASE_URL=http://ollama-service:11434
31+
volumes:
32+
- ./python-demo:/python-demo
33+
ports:
34+
- 8000:8000

connect.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
docker exec --workdir /python-demo -it python-demo /bin/bash
3+
4+

0 commit comments

Comments
 (0)