forked from apple/ml-sharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
34 lines (34 loc) · 821 Bytes
/
compose.yml
File metadata and controls
34 lines (34 loc) · 821 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
services:
sharp:
build:
context: .
dockerfile: Dockerfile
volumes:
- ./data:/app/data
ports:
- "7860:7860"
environment:
# Optional: Set authentication credentials
# SHARP_AUTH_USERNAME: "admin"
# SHARP_AUTH_PASSWORD: "changeme"
# Optional: Configure limits
# SHARP_MAX_FILE_SIZE_MB: "50"
# SHARP_PORT: "7860"
- NVIDIA_VISIBLE_DEVICES=all
deploy:
resources:
limits:
cpus: "8"
memory: 32G
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7860/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s