@@ -41,7 +41,7 @@ RUN git clone https://github.com/mathLab/ITHACA-FV.git && \
4141 chown -R $USER:$USER /home/$USER
4242
4343# Environment variables for bashrc
44- ARG of_var="source /usr/lib/openfoam/openfoam2412/etc /bashrc"
44+ ARG of_var="source \$ FOAM_ETC /bashrc"
4545ARG ithaca_var="source /opt/ITHACA-FV/etc/bashrc"
4646
4747# Update bashrc with OpenFOAM and ITHACA-FV sources
@@ -52,22 +52,26 @@ RUN echo $of_var >> /etc/bash.bashrc && \
5252USER $USER
5353
5454# Build ITHACA-FV with architecture-specific flags
55- RUN /bin/bash -c "source /usr/lib/openfoam/openfoam2412/etc/ bashrc && \
55+ RUN /bin/bash -c "source \$ FOAM_ETC/ bashrc && \
5656 cd ITHACA-FV && \
5757 git submodule update --init && \
5858 source etc/bashrc && \
5959 if [ \" $TARGETARCH\" = \" amd64\" ]; then \
6060 ./Allwmake -taumq -j 4; \
6161 else \
62- ./Allwmake -tau -j 4; \
62+ ./Allwmake -au -j 4; \
6363 fi"
6464
6565# Copy binaries and libraries to system paths (as root)
6666USER root
67- RUN if [ -d "/home/$USER/OpenFOAM/$USER-openfoam2412/platforms/linux64GccDPInt32Opt/bin" ]; then \
68- cp -r /home/$USER/OpenFOAM/$USER-openfoam2412/platforms/linux64GccDPInt32Opt/bin/* /usr/local/bin/ || true; \
69- cp -r /home/$USER/OpenFOAM/$USER-openfoam2412/platforms/linux64GccDPInt32Opt/lib/* /usr/local/lib/ || true; \
70- fi
67+ RUN for openfoam_dir in /home/$USER/OpenFOAM/$USER-openfoam*/platforms/*/; do \
68+ if [ -d "$openfoam_dir/bin" ]; then \
69+ cp -r "$openfoam_dir/bin" /* /usr/local/bin/ 2>/dev/null || true; \
70+ fi; \
71+ if [ -d "$openfoam_dir/lib" ]; then \
72+ cp -r "$openfoam_dir/lib" /* /usr/local/lib/ 2>/dev/null || true; \
73+ fi; \
74+ done
7175
7276# Final setup
7377USER $USER
0 commit comments