|
@@ -0,0 +1,132 @@
|
|
|
+# Copyright (c) Contributors to the Open 3D Engine Project.
|
|
|
+# For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
|
|
+#
|
|
|
+# SPDX-License-Identifier: Apache-2.0 OR MIT
|
|
|
+#
|
|
|
+
|
|
|
+FROM ros:humble-ros-base-jammy
|
|
|
+
|
|
|
+ARG minimal
|
|
|
+
|
|
|
+ENV WORKSPACE=/data/workspace
|
|
|
+ENV O3DE_REPO=https://github.com/o3de/o3de.git
|
|
|
+ENV ROS2_GEM_REPO=https://github.com/RobotecAI/o3de-ros2-gem.git
|
|
|
+ENV LOFT_GEM_REPO=https://github.com/o3de/loft-arch-vis-sample.git
|
|
|
+ENV O3DE_DEMO_REPO=https://github.com/RobotecAI/o3de-demo-project.git
|
|
|
+
|
|
|
+WORKDIR $WORKSPACE
|
|
|
+
|
|
|
+RUN apt-get update && apt-get upgrade -y
|
|
|
+
|
|
|
+# Add additional package repositories needed for packages
|
|
|
+RUN apt-get install -y --no-install-recommends gpg wget curl build-essential libssl-dev
|
|
|
+
|
|
|
+# Build and install cmake 3.24.3 from source since the default cmake version of ubuntu focal does not meet it
|
|
|
+RUN cd /data/workspace && \
|
|
|
+ wget -c https://github.com/Kitware/CMake/archive/refs/tags/v3.24.3.tar.gz && \
|
|
|
+ wget -c https://github.com/Kitware/CMake/releases/download/v3.24.3/cmake-3.24.3.tar.gz && \
|
|
|
+ tar -zxvf cmake-3.24.3.tar.gz && \
|
|
|
+ cd cmake-3.24.3 && \
|
|
|
+ ./bootstrap && \
|
|
|
+ make && \
|
|
|
+ make install && \
|
|
|
+ cmake --version
|
|
|
+
|
|
|
+#
|
|
|
+# Install packages needed for cloning and building from the source repos
|
|
|
+#
|
|
|
+
|
|
|
+# Install the git and build tools
|
|
|
+RUN apt-get install -y --no-install-recommends git \
|
|
|
+ git-lfs \
|
|
|
+ clang-12 \
|
|
|
+ ninja-build
|
|
|
+
|
|
|
+# Install the O3DE-specific required packages
|
|
|
+RUN apt-get install -y --no-install-recommends libglu1-mesa-dev \
|
|
|
+ libxcb-xinerama0 \
|
|
|
+ libxcb-xinput0 \
|
|
|
+ libxcb-xinput-dev \
|
|
|
+ libxcb-xfixes0-dev \
|
|
|
+ libxcb-xkb-dev \
|
|
|
+ libxkbcommon-dev \
|
|
|
+ libxkbcommon-x11-dev \
|
|
|
+ libfontconfig1-dev \
|
|
|
+ libcurl4-openssl-dev \
|
|
|
+ libsdl2-dev \
|
|
|
+ zlib1g-dev \
|
|
|
+ mesa-common-dev \
|
|
|
+ libssl-dev libxcb-icccm4 \
|
|
|
+ libxcb-image0 \
|
|
|
+ libxcb-keysyms1 \
|
|
|
+ libxcb-render-util0 \
|
|
|
+ libxcb-randr0 \
|
|
|
+ libnvidia-gl-470 \
|
|
|
+ ufw
|
|
|
+
|
|
|
+# Clone O3DE repo and register the engine
|
|
|
+RUN cd $WORKSPACE && \
|
|
|
+ git clone --single-branch --recursive --branch development $O3DE_REPO && \
|
|
|
+ cd o3de && \
|
|
|
+ git lfs install && \
|
|
|
+ git lfs pull
|
|
|
+
|
|
|
+RUN cd $WORKSPACE/o3de && \
|
|
|
+ python/get_python.sh
|
|
|
+RUN cd $WORKSPACE/o3de && \
|
|
|
+ $WORKSPACE/o3de/scripts/o3de.sh register --this-engine
|
|
|
+
|
|
|
+
|
|
|
+# Clone the ROS2 Gem and register it
|
|
|
+RUN cd $WORKSPACE && \
|
|
|
+ git clone $ROS2_GEM_REPO --single-branch --branch development && \
|
|
|
+ $WORKSPACE/o3de/scripts/o3de.sh register -gp $WORKSPACE/o3de-ros2-gem
|
|
|
+
|
|
|
+# Add additional ROS2/Galactic packages
|
|
|
+RUN /bin/bash -c 'source /opt/ros/humble/setup.bash && \
|
|
|
+ apt install -y ros-${ROS_DISTRO}-slam-toolbox \
|
|
|
+ ros-${ROS_DISTRO}-navigation2 \
|
|
|
+ ros-${ROS_DISTRO}-nav2-bringup \
|
|
|
+ ros-${ROS_DISTRO}-pointcloud-to-laserscan \
|
|
|
+ ros-${ROS_DISTRO}-gazebo-msgs \
|
|
|
+ ros-${ROS_DISTRO}-ackermann-msgs \
|
|
|
+ ros-${ROS_DISTRO}-control-toolbox'
|
|
|
+
|
|
|
+# Clone the loft scene and register the ArchVis Gem
|
|
|
+RUN cd $WORKSPACE && \
|
|
|
+ git clone --single-branch --recursive $LOFT_GEM_REPO && \
|
|
|
+ cd loft-arch-vis-sample && \
|
|
|
+ git lfs install && \
|
|
|
+ git lfs pull && \
|
|
|
+ $WORKSPACE/o3de/scripts/o3de.sh register -gp $WORKSPACE/loft-arch-vis-sample/Gems/ArchVis/
|
|
|
+
|
|
|
+
|
|
|
+# Clone the demo project and register the project
|
|
|
+RUN cd $WORKSPACE && \
|
|
|
+ git clone --single-branch --branch main --recursive $O3DE_DEMO_REPO && \
|
|
|
+ cd o3de-demo-project && \
|
|
|
+ git lfs install && \
|
|
|
+ git lfs pull && \
|
|
|
+ $WORKSPACE/o3de/scripts/o3de.sh register -pp $WORKSPACE/o3de-demo-project/
|
|
|
+
|
|
|
+
|
|
|
+# Configure the project
|
|
|
+RUN cd $WORKSPACE/o3de-demo-project && \
|
|
|
+ /bin/bash -c 'source /opt/ros/humble/setup.bash && \
|
|
|
+ cmake -B build/linux -S . -G "Ninja Multi-Config" -DCMAKE_BUILD_TYPE=profile -DLY_STRIP_DEBUG_SYMBOLS=TRUE -DLY_DISABLE_TEST_MODULES=ON'
|
|
|
+
|
|
|
+# Build the project
|
|
|
+RUN cd $WORKSPACE/o3de-demo-project && \
|
|
|
+ /bin/bash -c 'source /opt/ros/humble/setup.bash && \
|
|
|
+ cmake --build build/linux --config profile --target AssetProcessorBatch ROS2-Gem-Demo.GameLauncher ROS2-Gem-Demo.Assets -j 12'
|
|
|
+
|
|
|
+
|
|
|
+COPY LaunchClient.bash.ubuntu-humble /data/workspace/LaunchClient.bash
|
|
|
+COPY delete_source.bash /data/workspace/delete_source.bash
|
|
|
+
|
|
|
+RUN if [ "$minimal" -eq "1" ]; then /bin/bash -c 'source /data/workspace/delete_source.bash'; else echo "Skipping source delete"; fi
|
|
|
+
|
|
|
+ENV NVIDIA_VISIBLE_DEVICES all
|
|
|
+ENV NVIDIA_DRIVER_CAPABILITIES all
|
|
|
+
|
|
|
+ENTRYPOINT ["/bin/bash", "-c"]
|