forked from PJLab-ADG/SensorsCalibration
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_docker.sh
More file actions
executable file
·25 lines (22 loc) · 818 Bytes
/
run_docker.sh
File metadata and controls
executable file
·25 lines (22 loc) · 818 Bytes
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
#!/bin/sh
xhost +local:root;
if (nvidia-smi|grep NVIDIA)
then
# nvidia
echo "NVIDIA GPU detected, initialization calibration container"
docker run -it --privileged=true --net=host --gpus all \
--env="NVIDIA_DRIVER_CAPABILITIES=all" \
--env="DISPLAY" \
--env="QT_X11_NO_MITSHM=1" \
--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
--volume="${PWD}:/share" \
scllovewkf/opencalib:v1 /bin/bash -c "cd /share; /bin/bash;"
else
echo "NVIDIA GPU NOT detected, initialization calibration container"
docker run -it --privileged=true --net=host \
--env="DISPLAY" \
--env="QT_X11_NO_MITSHM=1" \
--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
--volume="${PWD}:/share" \
scllovewkf/opencalib:v1 /bin/bash -c "cd /share; /bin/bash;"
fi