-
Notifications
You must be signed in to change notification settings - Fork 4
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
Adds a dockerfile for webots with nuwebots and robocup environments #101
base: main
Are you sure you want to change the base?
Conversation
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.
Will need some documentation on NUbook for how to run this. Otherwise lgtm
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.
Quick and cheeky one off reviews
webots-docker/Dockerfile
Outdated
|
||
# Build the robocup controllers | ||
RUN git clone https://github.com/RoboCup-Humanoid-TC/hlvs_webots.git ./hlvs_webots && \ | ||
pip3 install -r ./hlvs_webots/controllers/referee/requirements.txt && make -j$(nproc) -C ./hlvs_webots |
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'm wondering - does $(nproc) affect caching if you ran it on a computer with a different amount of cores? Is it worth putting that in a script for that reason? (Presuming my suspicion is correct)
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.
That would make sense, but I haven't been able to find any solid info on it, so I'll need to test it. I don't understand why two computers would be building from the same cache though? Maybe I don't understand what you mean.
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.
Doesn't change caching. All that would change it is if you changed the actual text here
@JesseWilliamson could you have a look at addressing Kip's comments. Just run |
Requirements:
xhost +local:root
. To undo this runxhost -local:root
.nvidia-container-toolkit
is available as an Ubuntu package and is on the AUR. Webots recommends usingnvidia-docker2
instead, but as far as I can tell this is deprecated.Notes:
main
withwilliamson/webots-docker
.Running on host network:
docker run --gpus=all -it -e DISPLAY --env TEAM_NAME=nubots -v /tmp/.X11-unix:/tmp/.X11-unix:rw --network host WebotsImageName
. You can addwebots pathToWorldFile
to run a world file directly, or leave as-is to open a bash shell.--gpus=all
enables gpu acceleration, and TEAM_NAME is for the hlvs_robocup game.json file. If you aren't running on the host network you can use --env ROBOT_HOSTS to add comma separated addresses to the hlvs whitelist.You should be able to connect with localhost address as if webots was running normally outside a container.