Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
.git
.github
.vscode
build
build_*
5 changes: 1 addition & 4 deletions docker/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:focal
FROM ubuntu:noble

RUN apt-get update \
&& apt-get install -y \
Expand All @@ -10,6 +10,3 @@ RUN scripts/enable_stable.sh

COPY docker/scripts/install_common_deps.sh scripts/install_common_deps.sh
RUN scripts/install_common_deps.sh

COPY docker/scripts/enable_gcc8.sh scripts/enable_gcc8.sh
RUN scripts/enable_gcc8.sh
4 changes: 3 additions & 1 deletion docker/Dockerfile.nightly
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ RUN apt-get update \
libgz-gui9-dev \
libgz-msgs11-dev \
libgz-sensors9-dev \
libsdformat15-dev
libsdformat15-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

COPY . gz-sim
RUN cd gz-sim \
Expand Down
12 changes: 7 additions & 5 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ use the Gazebo code found in the current source tree.

1. [Install Docker](#Install-Docker)

You need at least 10GB or free space on a hard drive.

1. *Optional:* [Install NVidia Docker](#Install-Nvidia-Docker)

Nvidia docker will be needed if you plan to run the GUI and/or sensors
Expand Down Expand Up @@ -46,13 +48,13 @@ use the Gazebo code found in the current source tree.
3. Run the docker image with a bash shell.

```
docker run -it gz-sim:nightly /bin/bash
docker run --rm -it gz-sim:nightly /bin/bash
```

4. Alternatively, you can directly run Gazebo using

```
./docker/run.bash gz-sim:nightly gz-sim-server -v 4
./docker/run.bash gz-sim:nightly gz sim -v 4
```

## Gazebo Using Debians In Docker
Expand All @@ -73,21 +75,21 @@ distribution using debians.
image of Gazebo Garden:

```
./build.bash gz-garden ./Dockerfile.gz
./build.bash gz-ionic ./Dockerfile.gz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, but now we need to update the instruction right above to say "Gazebo Ionic"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll roll-back it here to garden and lines below too, due to build.bash not working properly with Ionic AFAIU. It executes Dockerfile.gz, which is based on nvidia/opengl:1.2-glvnd-devel-ubuntu20.04 image.

```

2. Run the docker image using `run.bash`, and pass in the name of the docker
image (first argument to the build.bash script).

```
./run.bash gz-garden
./run.bash gz
```

3. You can pass arguments to Gazebo by appending them the
`run.bash` command. For example, to load the shapes.sdf file:

```
./run.bash gz-garden -f shapes.sdf
./run.bash gz -f shapes.sdf
```

## Appendix
Expand Down
14 changes: 2 additions & 12 deletions docker/run.bash
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,8 @@ ARGS=("$@")
# This is necessary so Gazebo can create a context for OpenGL rendering
# (even headless).
XAUTH=/tmp/.docker.xauth
if [ ! -f $XAUTH ]
then
xauth_list=$(xauth nlist :0 | sed -e 's/^..../ffff/')
if [ ! -z "$xauth_list" ]
then
echo $xauth_list | xauth -f $XAUTH nmerge -
else
touch $XAUTH
fi
chmod a+r $XAUTH
fi
xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge -
chmod 777 $XAUTH

docker run -it \
-e DISPLAY \
Expand All @@ -40,7 +31,6 @@ docker run -it \
-v "/etc/localtime:/etc/localtime:ro" \
-v "/dev/input:/dev/input" \
--rm \
--gpus all \
--security-opt seccomp=unconfined \
$IMG \
${@:2}
17 changes: 0 additions & 17 deletions docker/scripts/enable_gcc8.sh

This file was deleted.

15 changes: 8 additions & 7 deletions docker/scripts/install_common_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,17 @@ sudo apt-get install --no-install-recommends -y \
cppcheck \
curl \
git \
g++-8 \
pkg-config \
g++ \
lcov \
pkg-config

sudo apt-get install --no-install-recommends -y \
clang-tidy-6.0 \
python-yaml \
libclang-6.0-dev
clang-tidy \
python3-yaml

sudo apt-get install --no-install-recommends -y \
libbenchmark-dev \
libbenchmark1
libbenchmark1.8.3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can get rid of libbenchmark1.8.3. It should be automatically installed with libbenchmark-dev

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this entire libbenchmark dependency is redundant, It's compiling fine even w/o this installation.
But as I said earlier, initial idea was to keep this PR as same as possible with previous implementation.

I'd like to remove it completely, if no objections

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

libbenchmark is an optional dependency. There are tests that use it, but they're disabled if libbenchmark is not installed

if (GzBenchmark_FOUND)

So I think we should keep it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted, commend added


sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/*
sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*