|
@@ -16,22 +16,14 @@ ENV O3DE_DEMO_REPO=https://github.com/RobotecAI/o3de-demo-project.git
|
|
|
|
|
|
WORKDIR $WORKSPACE
|
|
|
|
|
|
+COPY LaunchClient.bash.ubuntu-humble /data/workspace/LaunchClient.bash
|
|
|
+COPY cleanup.bash /data/workspace/cleanup.bash
|
|
|
+
|
|
|
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
|
|
|
#
|
|
@@ -40,10 +32,8 @@ RUN cd /data/workspace && \
|
|
|
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 \
|
|
|
+ ninja-build \
|
|
|
+ libglu1-mesa-dev \
|
|
|
libxcb-xinerama0 \
|
|
|
libxcb-xinput0 \
|
|
|
libxcb-xinput-dev \
|
|
@@ -64,24 +54,6 @@ RUN apt-get install -y --no-install-recommends libglu1-mesa-dev \
|
|
|
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 \
|
|
@@ -92,39 +64,37 @@ RUN /bin/bash -c 'source /opt/ros/humble/setup.bash && \
|
|
|
ros-${ROS_DISTRO}-ackermann-msgs \
|
|
|
ros-${ROS_DISTRO}-control-toolbox'
|
|
|
|
|
|
-# Clone the loft scene and register the ArchVis Gem
|
|
|
+# Clone O3DE repos, register, build, and cleanup in the same layer to reduce the size
|
|
|
RUN cd $WORKSPACE && \
|
|
|
+ git clone --single-branch --recursive --branch development $O3DE_REPO && \
|
|
|
+ cd o3de && \
|
|
|
+ git lfs install && \
|
|
|
+ git lfs pull && \
|
|
|
+ cd $WORKSPACE/o3de && \
|
|
|
+ python/get_python.sh && \
|
|
|
+ cd $WORKSPACE/o3de && \
|
|
|
+ $WORKSPACE/o3de/scripts/o3de.sh register --this-engine && \
|
|
|
+ cd $WORKSPACE && \
|
|
|
+ git clone $ROS2_GEM_REPO --single-branch --branch development && \
|
|
|
+ $WORKSPACE/o3de/scripts/o3de.sh register -gp $WORKSPACE/o3de-ros2-gem && \
|
|
|
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 && \
|
|
|
+ $WORKSPACE/o3de/scripts/o3de.sh register -gp $WORKSPACE/loft-arch-vis-sample/Gems/ArchVis/ && \
|
|
|
+ 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 && \
|
|
|
+ $WORKSPACE/o3de/scripts/o3de.sh register -pp $WORKSPACE/o3de-demo-project/ && \
|
|
|
+ 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
|
|
|
+ cmake -B build/linux -S . -G "Ninja Multi-Config" -DLY_STRIP_DEBUG_SYMBOLS=TRUE -DLY_DISABLE_TEST_MODULES=ON && \
|
|
|
+ cmake --build build/linux --config profile --target AssetProcessorBatch ROS2-Gem-Demo.GameLauncher ROS2-Gem-Demo.Assets -j 12 && \
|
|
|
+ cd $WORKSPACE && \
|
|
|
+ ./cleanup.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
|