Skip to content

Using GPU functionality with a custom docker image #806

Open
@ashwinjosephk

Description

@ashwinjosephk

Hi Community ,
I am new to the world of Dockers and would appreciate help to help me resolve an issue I am facing!

I tried your example here with ubuntu docker image it detects the nvidia drivers:
image

I am trying to setup a docker instance for me to carry out a calibration process. The command have been provided by the author too but when I try to execute it, apparantly GPU is not getting utilised though it is installed in the host system. The repo is:
https://github.com/koide3/direct_visual_lidar_calibration/tree/main

I am trying to run the calibration on the environemnt:ROS1 and Ubuntu 20
My commands are as follows:

# Define paths
bag_path=$(realpath /home/knadmin/Ashwin/Targetless_calib/livox_ros1)
preprocessed_path=$(realpath /home/knadmin/Ashwin/Targetless_calib/livox_ros1_preprocessed)

docker run \
  -it \
  --net host \
  --runtime=nvidia --gpus all  \
  -e DISPLAY=$DISPLAY \
  -v $HOME/.Xauthority:/root/.Xauthority \
  -v $bag_path:/tmp/input_bags \
  -v $preprocessed_path:/tmp/preprocessed \
  -v pip_cache:/root/.cache/pip \
  koide3/direct_visual_lidar_calibration:noetic /bin/bash nvidia-smi

but apparenty nvidia-smi is not getting recognized.
image

What should i do to rectify this issue? I understand this might be slightly off topic but I would be really helpful to udnerstand what is going wrong and how I can fix it. I checked the dockefile its already usign another required base image.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions