Skip to content

Commit fddfb61

Browse files
committed
Changes for the github codespace
1 parent e8c7bc6 commit fddfb61

3 files changed

Lines changed: 126 additions & 0 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/java
3+
{
4+
"name": "Java",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/java:1-21-bullseye",
7+
8+
"features": {
9+
"ghcr.io/devcontainers/features/java:1": {
10+
"version": "none",
11+
"installMaven": "true",
12+
"installGradle": "false"
13+
}
14+
},
15+
"customizations": {
16+
"vscode": {
17+
"extensions": [
18+
"vscjava.vscode-java-pack",
19+
"tal7aouy.theme"
20+
],
21+
"settings": {
22+
"workbench.colorTheme": "Theme"
23+
}
24+
}
25+
}
26+
27+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
28+
// "forwardPorts": [],
29+
30+
// Use 'postCreateCommand' to run commands after the container is created.
31+
// "postCreateCommand": "java -version",
32+
33+
// Configure tool-specific properties.
34+
// "customizations": {},
35+
36+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
37+
// "remoteUser": "root"
38+
}

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for more information:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
# https://containers.dev/guide/dependabot
6+
7+
version: 2
8+
updates:
9+
- package-ecosystem: "devcontainers"
10+
directory: "/"
11+
schedule:
12+
interval: weekly

uploads/Steps.txt

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
1) Create docker-compose.yml file for pgvector
2+
version: '3.1'
3+
services:
4+
postgres:
5+
image: pgvector/pgvector:pg16
6+
container_name: pgvector-db
7+
environment:
8+
POSTGRES_USER: raguser
9+
POSTGRES_PASSWORD: ragpass
10+
POSTGRES_DB: ragdb
11+
ports:
12+
- "5432:5432"
13+
volumes:
14+
- pgvector_data:/var/lib/postgresql/data
15+
volumes:
16+
pgvector_data:
17+
18+
2) Run the command to start the container in detached mode:
19+
Open terminal in the folder where the docker-compose.yml file is and then run
20+
docker compose up -d
21+
3) Docker will pull the pgvector/pgvector:pg16 image and start the Postgres instance with pgvector extension enabled.
22+
23+
You can verify the container is running with:
24+
docker ps
25+
For stopping:
26+
docker compose down
27+
28+
4) Ollama (for local LLMs):
29+
docker run -d -p 11434:11434 --name ollama ollama/ollama
30+
31+
32+
This will pull a model (e.g., llama3): ollama pull llama3
33+
Ollama exposes REST API at http://localhost:11434
34+
35+
5) Pull the embedding model
36+
37+
Find your running Ollama container:
38+
39+
40+
docker ps
41+
Access the shell inside the container:
42+
43+
44+
docker exec -it ollama bash
45+
46+
Once in the shell, run:
47+
48+
--For embedding
49+
ollama pull mxbai-embed-large
50+
ollama pull bge-m3
51+
--For chat
52+
ollama pull gemma3n:e2b
53+
54+
6) Create the table in Postgres
55+
In docker running container in docker desktop enter
56+
psql -U raguser -d ragdb
57+
58+
CREATE EXTENSION IF NOT EXISTS vector;
59+
60+
61+
CREATE TABLE public.vector_store (
62+
id UUID PRIMARY KEY,
63+
content TEXT NOT NULL,
64+
metadata JSONB,
65+
embedding VECTOR(1024) NOT NULL
66+
);
67+
68+
CREATE TABLE public.documents (
69+
id UUID PRIMARY KEY,
70+
content TEXT NOT NULL,
71+
metadata JSONB,
72+
embedding VECTOR(1024) NOT NULL
73+
);
74+
75+
76+

0 commit comments

Comments
 (0)