generated from penM000/fastapi-template
-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose-nvenc.yml
66 lines (61 loc) · 1.42 KB
/
docker-compose-nvenc.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
version: '3.8'
services:
web:
image: nginx
restart: always
ports:
- 8000:80
environment:
- apiserver=apiserver
- TZ=Asia/Tokyo
- BASIC_USER=user
- BASIC_PASS=pass
volumes:
- videodata:/var/www/html/video
- filedata:/var/www/html/file
- $PWD/nginx/templates:/etc/nginx/templates
- $PWD/nginx/basic.sh:/docker-entrypoint.d/basic.sh
logging:
driver: "json-file"
options:
max-size: "3m"
max-file: "1"
apiserver:
build:
context: .
dockerfile: ./docker/nvenc-api/Dockerfile
restart: always
environment:
- TZ=Asia/Tokyo
volumes:
- videodata:/videoapi/video
- filedata:/videoapi/file
- $PWD/:/videoapi
devices:
- /dev/dri:/dev/dri
- /dev/dri/renderD128:/dev/dri/renderD128
- /dev/dri/card0:/dev/dri/card0
command: /bin/sh -c "cd videoapi &&./start.sh "
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
deploy:
resources:
reservations:
devices:
- capabilities: [utility, compute, video]
volumes:
videodata:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: '$PWD/video'
filedata:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: '$PWD/file'