Skip to content

Commit

Permalink
[Docker] Enable gpus argument only if nvidia devices exist (StoglRo…
Browse files Browse the repository at this point in the history
…botics#90)

Co-authored-by: Daniel Azanov <[email protected]>
  • Loading branch information
muritane and Daniel Azanov authored Jan 11, 2023
1 parent 82264af commit e8ad919
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/docker/_RosTeamWs_Docker_Defines.bash
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ RTW_Docker_create_docker_container () {
xhost +local:docker
docker run \
--net=host \
--gpus all \
$([ $(ls -la /dev | grep nvidia | wc -l) "!=" "0" ] && echo "--gpus all") \
-h ${docker_host_name} \
-e DISPLAY \
-e QT_X11_NO_MITSHM=1 \
Expand Down
2 changes: 1 addition & 1 deletion templates/docker/recreate_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ RTW_WS_create_docker_container_instance () {
xhost +local:docker
docker run \
--net=host \
--gpus all \
$([ $(ls -la /dev | grep nvidia | wc -l) "!=" "0" ] && echo "--gpus all") \
-h ${docker_host_name} \
-e DISPLAY \
-e QT_X11_NO_MITSHM=1 \
Expand Down

0 comments on commit e8ad919

Please sign in to comment.