-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
38 lines (36 loc) · 1019 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
38 lines (36 loc) · 1019 Bytes
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
version: '3.8'
services:
bitnet-web:
build:
context: .
dockerfile: Dockerfile
container_name: bitnet-chat
ports:
- "127.0.0.1:8080:8080"
volumes:
# Mount the model directory to avoid downloading inside the container
- ./models:/app/models
# Mount the build directory to persist compiled binaries
- ./build:/app/build
environment:
- MODEL_PATH=/app/models/BitNet-b1.58-2B-4T/ggml-model-i2_s.gguf
- CTX_SIZE=2048
- N_PREDICT=512
- TEMPERATURE=0.8
- THREADS=4
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Optional: Use for GPU acceleration with NVIDIA Docker
# Uncomment the following and use --gpus all flag when running
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: 1
# capabilities: [gpu]