-
Notifications
You must be signed in to change notification settings - Fork 228
Development container support using docker-compose #817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Jose Luis Rivero <[email protected]>
Signed-off-by: Jose Luis Rivero <[email protected]>
Signed-off-by: Jose Luis Rivero <[email protected]>
gz-harmonic from packages.osrfoundation.org repostiory and | ||
the VRX dependencies using rosdep. | ||
|
||
* `Dockerfile.builder`: built on top of `vrx-base`. Compiles the vrx packages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should explain what is vrx-base
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Include the image names in ad84a95
docker/README.md
Outdated
* `Dockerfile.builder`: built on top of `vrx-base`. Compiles the vrx packages | ||
using colcon. | ||
|
||
* `Dockerfile.devel`: built on top of `vrx-base`. development image with extra ROS 2 development packages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: There's a newline here and extra indentation in Dockerfile.builder
and Dockerfile.devel
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lines are broken at 80 chars to faciitate diffs. Leaving one empty line between items:
* `Dockerfile.base`: built on top of osrf desktop-full. Install
gz-harmonic from packages.osrfoundation.org repostiory and
the VRX dependencies using rosdep. Generates the `vrx-base` image.
* `Dockerfile.builder`: built on top of `vrx-base`. Compiles the vrx packages
using colcon. Generates the `vrx-builder` image.
* `Dockerfile.devel`: built on top of `vrx-base`. development image with
extra ROS 2 development packages and other dev utilities. It configures
the GPU support and a development user. Runs a shell into the container
with local sources mapped in /ws. Generates the `vrx-devel` image.
docker/README.md
Outdated
$ ubuntu@locashot:/ws$ export ROS_DISTRO=jazzy | ||
# compile vrx code | ||
$ ubuntu@localhost:/ws$ . /opt/ros/${ROS_DISTRO}/setup.sh \ | ||
&& apt update \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sudo
? What about the password?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ouch be539d3
docker/README.md
Outdated
... | ||
... | ||
# docker building and return a shell inside the container | ||
$ ubuntu@locashot:/ws$ export ROS_DISTRO=jazzy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to have this command exported, the VRX dependencies installed, and sourcing the setup.bash
from ROS already configured?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep we can add an entrypoint 85cd5cd
@@ -0,0 +1,61 @@ | |||
# VRX Docker support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this file play with the Docker installation instructions from the wiki?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prerequisites are the same. No need to clone dockwater repository anymore, just run the docker compose
command.
Signed-off-by: Jose Luis Rivero <[email protected]>
Signed-off-by: Jose Luis Rivero <[email protected]>
Signed-off-by: Jose Luis Rivero <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have two suggestions:
- Omit the
README
file and update the wiki accordingly for not having to maintain two sources of installation instructions. - Reduce the number of
Dockerfile
flavors to just the ones we have a use case (either described in the tutorial or used by our CI).
Signed-off-by: Jose Luis Rivero <[email protected]>
The three flavours in this PR are all expected to be used: base, builder (to be used by the CI) and devel. The main change is that we are not going to produce a release one but use the devel one for the users.
Changed the docker install in https://github.com/osrf/vrx/wiki/docker_install_tutorial/_compare/1f54d2ec84fc7959b7139f738224c77fb76db48f and reduced the README file to only explain the Dockerfiles in f4a1124 . |
Can we also pass an argument to rocker for being able to use This step talks about |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested the new Docker installation instructions in my laptop and the problem I'm experiencing is that I'm not getting GPU acceleration. Using dockwater
I'm getting around 0.85, 0.9 RTF but following our instructions I'm getting 0.05 RTF.
docker/docker-compose.yml
Outdated
@@ -0,0 +1,51 @@ | |||
version: '3.2' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got this warning when running docker compose build devel --with-dependencies
:
WARN[0000] /home/caguero/vrx_ws/src/vrx/docker/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion
Compose can now delegate builds to bake for better performance.
I also saw these other three warning messages:
=> WARN: UndefinedVar: Usage of undefined variable '$NVIDIA_VISIBLE_DEVICES' (li 0.0s
=> WARN: UndefinedVar: Usage of undefined variable '$NVIDIA_DRIVER_CAPABILITIES' 0.0s
=> WARN: UndefinedVar: Usage of undefined variable '$LD_LIBRARY_PATH' (line 68) 0.0s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the first warning 92bad35. Second warning about the undefined variable should be harmless.
Although I added support to run the thing without rocker the fact that rocker can manage the user and home directory easily is making the instructions now not to use it. We can potentially remove it.
Signed-off-by: Jose Luis Rivero <[email protected]>
Signed-off-by: Jose Luis Rivero <[email protected]>
I just re-run the build + run pipeline and seems to work fine here: Could you check inside the container: grep -A5 "RenderSystem capabilities" ~/.gazebo/ogre.log |
Did you try it in your laptop? This is a problem in my laptop that doesn't happen with the previous Docker setup.
I don't see this block when running it using
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are the instructions updated? I'm following this link. There is no documentation about how to run the docker compose.
I tried
docker compose up
then I join the docker container
docker exec -it docker-devel-1 bash
and try to run the example:
ros2 launch vrx_gz competition.launch.py world:=sydney_regatta
But I'm getting an error related with the display:
[gazebo-1] Authorization required, but no authorization protocol specified
[gazebo-1]
[gazebo-1] qt.qpa.xcb: could not connect to display unix:1
[gazebo-1] qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
[gazebo-1] This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
[gazebo-1]
[gazebo-1] Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
https://github.com/osrf/vrx/wiki/docker_install_tutorial#step-3-run-your-container . |
Signed-off-by: Jose Luis Rivero <[email protected]>
de9ec3d
to
ac38e42
Compare
Signed-off-by: Jose Luis Rivero <[email protected]>
@ahcorde you will need that rocker command in the image or the wiki to make the GPU / X configuration setup to work properly. |
But I still get 20% RTF compared with 85-90% using |
Signed-off-by: Jose Luis Rivero <[email protected]>
Removed comments and unused file. good to go |
Refactor de Docker support to provide the base for using different docker images in different use cases. This PR targets only the development container support for the users building and running VRX code.
Instructions are provided in the
README.md
. Subsequent PRs should use the docker images for implementing releasing and CI.