Docker should be configured to be able to access the GPU throught nvidia-containers. To install nvidia-container-runtime:
sudo apt-get install nvidia-container-runtime
If docker is not yet configured to use nvidia-container-runtime, it can be done with:
sudo tee /etc/docker/daemon.json <<EOF
{
"runtimes": {
"nvidia": {
"path": "/usr/bin/nvidia-container-runtime",
"runtimeArgs": []
}
}
}
EOF
Then restart docker service:
sudo systemctl daemon-reload
sudo systemctl restart docker
git clone https://[email protected]/oriel/doodlenet_heliaus_demo.git
Go to the path of the cloned repository:
cd doodlenet_heliaus_demo
docker build -f Dockerfile_pc_ros2 -t "doodlenet_ros2:beta" .
docker build -f Dockerfile_jetson_ros2 -t "doodlenet_ros2:beta" .
Run this bash script to allow gpu usage, host network, X graphic server:
bash runDocker.sh
python3 autosens_demo.py
Note that the demo with default parameters use "source_images_rgb" and "source_images_lwir" as input ROS2 topics. You may use custom input topics for the Autosens demo with:
python3 autosens_demo.py --rgb_topic /camera/flea/left/aligned --lwir_topic /camera/smartIR640/cam_0008/ir_frame_enhanced/recified
You may check other available customisable parameters with:
python3 autosens_demo.py --help