-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
43 lines (43 loc) · 1.05 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
version: "3.8"
services:
diffusers-ocaml:
build:
context: .
dockerfile: .build/Dockerfile
network: host
args:
USER_NAME: ${USER_NAME}
UID: ${CURRENT_UID}
GID: ${CURRENT_GID}
OCAML_COMPILER: ${OCAML_COMPILER}
image: localhost:5000/diffusers-ocaml
container_name: diffusers-ocaml-${USER}
stdin_open: true
tty: true
restart: always
volumes:
- type: bind
source: ${MODELS_DIR}
target: /home/${USER_NAME}/diffusers_ocaml
- /home/${USER_NAME}/diffuser_ocaml/_build/
- type: bind
source: /etc/passwd
target: /etc/passwd
read_only: true
- type: bind
source: /etc/group
target: /etc/group
read_only: true
- type: bind
source: /etc/shadow
target: /etc/shadow
read_only: true
user: ${CURRENT_UID}:${CURRENT_GID}
ports:
- "127.0.0.1:${PORT}:8080"
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
shm_size: 2gb