-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml.bak
More file actions
77 lines (71 loc) · 2.22 KB
/
docker-compose.yml.bak
File metadata and controls
77 lines (71 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
services:
db:
image: pgvector/pgvector:pg16
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
LANG: C.UTF-8
LC_ALL: C.UTF-8
volumes:
- postgres_data:/var/lib/postgresql/data
- .:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
ports:
- "5432:5432"
command: >
bash -c "
# Install dependencies
apt-get update &&
apt-get install -y flex bison git build-essential postgresql-server-dev-16 cmake pkg-config libxml2-dev postgresql-contrib postgresql-16-http &&
# Setup bison
which bison &&
ln -s /usr/bin/bison /usr/local/bin/bison &&
# Install AGE
cd /tmp &&
rm -rf age &&
git clone https://github.com/apache/age.git &&
cd age &&
git checkout PG16 &&
USE_PGXS=1 PG_CONFIG=/usr/lib/postgresql/16/bin/pg_config make clean &&
USE_PGXS=1 PG_CONFIG=/usr/lib/postgresql/16/bin/pg_config make &&
USE_PGXS=1 PG_CONFIG=/usr/lib/postgresql/16/bin/pg_config make install &&
# Copy ALL SQL files
cp /tmp/age/sql/*.sql /usr/share/postgresql/16/extension/ &&
cp /tmp/age/*.sql /usr/share/postgresql/16/extension/ &&
cp /tmp/age/age.control /usr/share/postgresql/16/extension/ &&
# Start PostgreSQL
docker-entrypoint.sh postgres"
embeddings:
image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.8.3
platform: linux/amd64
command:
- --model-id
- unsloth/embeddinggemma-300m
- --dtype
- float32
- --pooling
- mean
ports:
- "8080:80"
environment:
- DTYPE=float32
- MAX_CONCURRENT_REQUESTS=512
- MODEL_ID=unsloth/embeddinggemma-300m
- CANDLE_DISABLE_BLAS=1
volumes:
- embeddings_cache:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
volumes:
postgres_data:
embeddings_cache: