Skip to content

Instantly share code, notes, and snippets.

@edp8489
Last active December 17, 2024 02:55
Show Gist options
  • Select an option

  • Save edp8489/11d9e93fbea5952caac526b89dd92b53 to your computer and use it in GitHub Desktop.

Select an option

Save edp8489/11d9e93fbea5952caac526b89dd92b53 to your computer and use it in GitHub Desktop.
OpenRadioss Dockerfile
FROM rockylinux:9
# Install development tools and dependencies
RUN dnf groupinstall -y "Development Tools" && \
dnf install -y \
gcc gcc-gfortran gcc-c++ make cmake perl git-lfs \
wget git patch diffutils libxcrypt-compat \
which python
# Download and extract OpenMPI source code
WORKDIR /tmp
RUN wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.2.tar.gz && \
tar xzvf openmpi-4.1.2.tar.gz && \
cd openmpi-4.1.2 && \
./configure --prefix=/opt/openmpi && \
make -j && \
make install
# Clone OpenRadioss repository and build it
WORKDIR /opt
RUN git lfs install && \
git clone --depth 1 --branch main https://github.com/OpenRadioss/OpenRadioss.git && \
cd /opt/OpenRadioss/starter && \
./build_script.sh -arch=linux64_gf && \
cd /opt/OpenRadioss/engine && \
./build_script.sh -arch=linux64_gf && \
./build_script.sh -arch=linux64_gf -mpi=ompi && \
cd /opt/OpenRadioss/tools/anim_to_vtk/linux64 && \
./build.bash && \
cd /opt/OpenRadioss/tools/th_to_csv/linux64 && \
./build.bash
# Set environment variables
ENV OPENRADIOSS_PATH=/opt/OpenRadioss
ENV RAD_CFG_PATH=$OPENRADIOSS_PATH/hm_cfg_files
ENV OMP_STACKSIZE=400m
ENV PATH=$OPENRADIOSS_PATH/exec:$PATH
ENV LD_LIBRARY_PATH=$OPENRADIOSS_PATH/extlib/hm_reader/linux64/:$OPENRADIOSS_PATH/extlib/h3d/lib/linux64/:$LD_LIBRARY_PATH
ENV PATH=/opt/openmpi/bin:$PATH
ENV LD_LIBRARY_PATH=/opt/openmpi/lib:$LD_LIBRARY_PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment