cd docker/nvidia
./build.sh
You can find the docker file and config files under docker/nvidia
.
You'll be user ros
with password ros
and sudo
powers. The current directory will be mounted to /workspace
in the container.
./run-nvidia.sh
scripts/docker_run.sh
is a script for create/start/attach to the same container from multiple terminals. Use it to quickly get in your container without worrying about duplicating your container.
The behavior of the script is as follows. If the container is:
- Running, then connect to it in a new terminal.
- Stopped, then start it and connect to it.
- Not yet created, then create it (you must have already built the image).
Suggested use of the script: 1. Edit paths. Open docker_run.sh with a text editor. There are a few paths at the beginning, you need to set them according to your system.
2. Make an executable.
# in your host machine
cp docker_run.sh ~/bin # copy it to ~/bin
echo "export PATH="~/bin:$PATH"" >> ~/.bashrc # add ~/bin to your path
source ~/.bashrc
cd ~/bin
mv docker_run.sh rosstart # give it a convenient name, remove the '.sh' postfix
chmod -x rosstart # give it executable access
# from anywhere
rosstart # run the container
# from another terminal
rosstart # run another terminal on this container
Modified based on https://github.com/sunsided/ros-gazebo-gpu-docker