Spaces:
Running
Running
Upload docker-compose.yaml
Browse files- docker-compose.yaml +42 -0
docker-compose.yaml
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
services:
|
2 |
+
frontend:
|
3 |
+
image: sam2/frontend
|
4 |
+
build:
|
5 |
+
context: ./demo/frontend
|
6 |
+
dockerfile: frontend.Dockerfile
|
7 |
+
ports:
|
8 |
+
- 7262:80
|
9 |
+
|
10 |
+
backend:
|
11 |
+
image: sam2/backend
|
12 |
+
build:
|
13 |
+
context: .
|
14 |
+
dockerfile: backend.Dockerfile
|
15 |
+
ports:
|
16 |
+
- 7263:5000
|
17 |
+
volumes:
|
18 |
+
- ./demo/data/:/data/:rw
|
19 |
+
environment:
|
20 |
+
- SERVER_ENVIRONMENT=DEV
|
21 |
+
- GUNICORN_WORKERS=1
|
22 |
+
# Inference API needs to have at least 2 threads to handle an incoming
|
23 |
+
# parallel cancel propagation request
|
24 |
+
- GUNICORN_THREADS=2
|
25 |
+
- GUNICORN_PORT=5000
|
26 |
+
- API_URL=http://localhost:7263
|
27 |
+
- DEFAULT_VIDEO_PATH=gallery/05_default_juggle.mp4
|
28 |
+
# # ffmpeg/video encode settings
|
29 |
+
- FFMPEG_NUM_THREADS=1
|
30 |
+
- VIDEO_ENCODE_CODEC=libx264
|
31 |
+
- VIDEO_ENCODE_CRF=23
|
32 |
+
- VIDEO_ENCODE_FPS=24
|
33 |
+
- VIDEO_ENCODE_MAX_WIDTH=1280
|
34 |
+
- VIDEO_ENCODE_MAX_HEIGHT=720
|
35 |
+
- VIDEO_ENCODE_VERBOSE=False
|
36 |
+
deploy:
|
37 |
+
resources:
|
38 |
+
reservations:
|
39 |
+
devices:
|
40 |
+
- driver: nvidia
|
41 |
+
count: 1
|
42 |
+
capabilities: [gpu]
|