-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose.yml
71 lines (70 loc) · 1.8 KB
/
docker-compose.yml
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
version: '3.4'
services:
dev:
image: developmentseed/sam-dev:v1
build:
context: .
dockerfile: Dockerfile-dev
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
ports:
- '8888:8888'
volumes:
- ./:/segment-anything-services
build:
image: developmentseed/sam-build:v1
build:
context: .
dockerfile: Dockerfile-build
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
# command: "sleep 360000"
command: "/bin/bash -c '
mkdir -p /home/segment-anything-service/model-weights/ &&
cp /workspace/model-weights/* /home/segment-anything-service/model-weights &&
cp /workspace/sam_* /home/segment-anything-service/model-store/ &&
sleep 360000'"
volumes:
- ./:/home/segment-anything-service
working_dir: /home/segment-anything-service
cpu:
image: developmentseed/sam-cpu:v1
build:
context: .
dockerfile: Dockerfile-cpu
ports:
- '7080:7080'
command: "sleep 360000"
volumes:
- ./:/home/segment-anything-service
- ./model-store:/home/model-server/volume/model-store
working_dir: /home/segment-anything-service
gpu:
image: developmentseed/sam-gpu:v1
build:
context: .
dockerfile: Dockerfile-gpu
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
ports:
- '8080:8080'
command: sleep 360000
volumes:
- ./:/home/segment-anything-service
- ./model-store:/home/model-server/volume/model-store
working_dir: /home/segment-anything-service