osrf / rocker

A tool to run docker containers with overlays and convenient options for things like GUIs etc.
Apache License 2.0
559 stars 73 forks source link

cuda-dev #158

Closed woensug-choi closed 2 years ago

woensug-choi commented 3 years ago

The rocker cuda PR does not include executables of the Cuda libraries. It's because PR only copied apt-get installation of the Nvidia cudagl's base dockerfile. For our purposes, all those executables are required to compile the .cu source code of the multibeam sonar plugin.

I believe that --cuda flag without Cuda executables could have usability that does not require compile of .cu source files. I've made a new --cuda-dev flag that includes all installations required.

I've tested the functionality with the Dave project's Multibeam Sonar Plugin. https://github.com/Field-Robotics-Lab/DAVE

woensug-choi commented 2 years ago

@tfoote I hope to see this merged or receive comments if you think its not ready :)

woensug-choi commented 2 years ago

What kinds of unit tests do we need? I've been using this branch with a gazebo plugin that requires Cuda compilation.

What do you mean by layer story? Both devel and runtime image based on the base.

tfoote commented 2 years ago

For tests, we need tests that provide coverage of the code paths. They need to run examples that exercise the code paths and exercise the cuda capabilities so that we know that it's still working when we deploy it. We have 84% code coverage on the non-nvidia stuff. If you run it locally with the nvidia tests it's higher. But you content has zero unit tests.

For the story we need to be able to explain to the users. If you want this features do this. If you want that feature do that. If you want this and that t do they work together? In particular since this is taking the capabilities of #126 and going further, it should probably be done as a series of layers that will first enable the base, and then install the specific tools, so that you have core nvidia, then extend it for the runtime, and then extend that for dev tools. Instead of having each plugin potentially installing different separate versions of cuda tools.

woensug-choi commented 2 years ago

Hmm... Very much unfamiliar with the code coverage concept. Let me get back to you when I understand what it is about :D

tfoote commented 2 years ago

There's an overview of how to run the tests and you'll see reports here: https://github.com/osrf/rocker#testing

woensug-choi commented 2 years ago

https://github.com/osrf/rocker/blob/0dea4de4014cf288e7f914e21b00edef498b1545/src/rocker/templates/cuda_dev_snippet.Dockerfile.em#L10-L12

@tfoote I've made a change to use the package manager. It now avoids specifying versions for dependent packages. I've tested in WSL Ubuntu 20.04. It should also work for the generic Ubuntu installation.

tfoote commented 2 years ago

@woensug-choi I think that I've merged all of this into #126 could you verify that it meets your needs now?

Note: I changed the argument to --cuda

woensug-choi commented 2 years ago

@tfoote I confirm that everything I need is merged into #126. Closing this PR.

tfoote commented 2 years ago

Great thanks for verifying.