-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.nvidia.yaml
More file actions
71 lines (55 loc) · 2.34 KB
/
docker-compose.nvidia.yaml
File metadata and controls
71 lines (55 loc) · 2.34 KB
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.9"
services:
###### name service ######
# (note: you can create multiple)
gstdocker_service_master:
#### name image & container ####
image: pwolfe854/${CONTAINER_NAME}:${ARCH}_gpu
container_name: ${CONTAINER_NAME}
#### command to keep container alive ####
# copied into /usr/local/bin on build
command: custom_starting_script.sh ${ENABLE_SSH}
#### build Dockerfile and pass build args ####
build:
context: .
dockerfile: Dockerfile
args:
FROM_IMG: ${FROM_IMG}
BUILD_ENV: ${GPU_ARG}
ENABLE_SSH: ${ENABLE_SSH}
#### volumes and mappings ####
volumes:
## volumes ##
# - root:/root/
# - consider adding the .engine models here after conversion for saving time on launch
## mappings ##
- /tmp/.X11-unix/:/tmp/.X11-unix # x11
- ~/.ssh:/root/.ssh:ro # ssh folder from linux host
## development folder mappings here ##
- ./examples:${WORKDIR}/gitfoldermap/examples # git folder map
- ./sub_projects/deepstream_pose_estimation:${WORKDIR}/sources/apps/sample_apps/deepstream_pose_estimation
- ./examples:/home/nvidia/examples
- ./helper_scripts:/home/nvidia/helper_scripts
## device mappings ##
- /dev/video0:/dev/video0 # for camera on video0 for example
- /tmp/argus_socket:/tmp/argus_socket # map the argus_socket for csi cameras using nvarguscamerasrc
#### environmental variables to set inside the container ####
# environment:
# - DISPLAY=$DISPLAY
# PATH_ADD: /opt/nvidia/deepstream/deepstream-6.0/bin # you can append this to bashrc using dockerfile
#### priveleged gains access to all devices on host ####
# good for running docker inside docker if you need. also owning devices like /dev/video0
privileged: true
#### configure docker network mode ####
network_mode: "host" # uses host network stack
#### runtime libraries ####
runtime: nvidia
#### start container on boot ####
restart: always
#### container directory to start in ####
# working_dir: ${WORKDIR}/sources/apps/sample_apps/deepstream_pose_estimation
working_dir: ${WORKDIR}/gitfoldermap/examples/network
#### create volumes here ####
# volumes:
# root:
# maybe this for .engine files? /opt/nvidia/deepstream/deepstream-6.0/samples/models/