Skip to content

Commit

Permalink
Fix ngen work image builds and lib paths.
Browse files Browse the repository at this point in the history
Adding LD_LIBRARY_PATH as needed and fixing issue with numpy appearing
to not be present (even though it was) by running within Python virtual
directory.
  • Loading branch information
robertbartel committed May 21, 2024
1 parent 709ac8b commit 4e66913
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion docker/main/ngen/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,10 @@ RUN if [ "${NGEN_WITH_PYTHON}" == "ON" ]; then \
fi
USER ${USER}

ENV VIRTUAL_ENV=/dmod/venv
RUN python3 -m venv $VIRTUAL_ENV && pip3 install numpy
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

RUN cd ${BOOST_ROOT} \
&& tar -xf boost_tarball.blob --strip 1 \
&& rm boost_tarball.blob \
Expand Down Expand Up @@ -843,7 +847,11 @@ RUN cd ${BOOST_ROOT} \
&& chmod +x ${WORKDIR}/entrypoint.sh

WORKDIR ${WORKDIR}
ENV PATH=${WORKDIR}:${WORKDIR}/bin:$PATH
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib:/usr/local/lib64:/dmod/shared_libs
# This next value is eventually needed for the t-route build ...
# ... make sure it stays in sync with configure step for netcdf above
ENV NETCDFINC=/usr/include
ENV PATH=/dmod/bin:${WORKDIR}:${WORKDIR}/bin:$PATH:/usr/lib64/mpich/bin
ENV NGEN_PART_EXECUTABLE="${PARTITIONER_EXECUTABLE}"
ENTRYPOINT ["entrypoint.sh"]

Expand All @@ -863,6 +871,13 @@ ENV WORKDIR=${WORKDIR}
ENV HYDRA_HOST_FILE=/etc/opt/hosts
ENV PATH=${WORKDIR}:${WORKDIR}/bin:/dmod/bin:${PATH}:/usr/lib64/mpich/bin

ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib:/usr/local/lib64:/dmod/shared_libs
# This next value is eventually needed for the t-route build ...
# ... make sure it stays in sync with configure step for netcdf above
ENV NETCDFINC=/usr/include
ENV VIRTUAL_ENV=/dmod/venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

#RUN cd ./ngen && mkdir ${WORKDIR}/bin && cp cmake_build/ngen ${WORKDIR}/bin && cp -r data ${WORKDIR}/data \
# && cd $WORKDIR && rm -rf ngen boost

Expand Down

0 comments on commit 4e66913

Please sign in to comment.