Skip to content

Commit

Permalink
Fix ngen deps fails due to blosc2 and boost directory (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
benlee0423 authored May 1, 2024
1 parent 366793c commit a34820c
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions docker/Dockerfile.ngen-deps
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ ENV WORKDIR=${WORKDIR} \
NETCDF_FORTRAN_VERSION=${NETCDF_FORTRAN_VERSION} \
HYDRA_HOST_FILE=/etc/opt/hosts

COPY --from=downloads /boost ${WORKDIR}/boost
COPY --from=downloads /boost /tmp/ngen-deps
COPY --from=downloads /tmp/mpich-${MPICH_VERSION}.tar.gz /tmp/ngen-deps/mpich-${MPICH_VERSION}.tar.gz
COPY --from=downloads /tmp/hdf5-${HD5_VERSION}.tar.gz /tmp/ngen-deps/hdf5-${HD5_VERSION}.tar.gz
COPY --from=downloads /tmp/netcdf-${NETCDF_C_VERSION}.tar.gz /tmp/ngen-deps/netcdf-${NETCDF_C_VERSION}.tar.gz
Expand Down Expand Up @@ -163,15 +163,7 @@ RUN pip3 install --upgrade pip \
&& make \
&& make install \
# Install required python dependency packages with Pip \
# Except blosc2, since packaged wheels on pypi seem to have some issues, build it ourselves
&& cd /tmp/ngen-deps \
&& git clone https://github.com/Blosc/python-blosc2/ \
&& cd python-blosc2 \
# checkout a release tag
&& git checkout ${BLOSC2_VERSION} \
&& git submodule update --init --recursive \
&& python3 -m pip install -r requirements-build.txt \
&& pip3 install . \
&& pip3 install blosc2 \
&& pip3 install numpy pandas pyyaml bmipy Cython==3.0.3 netCDF4==1.6.3 wheel packaging \
&& HDF5_DIR=/usr pip3 install -v --no-build-isolation tables \
# Make aliases for convenience \
Expand All @@ -180,8 +172,9 @@ RUN pip3 install --upgrade pip \
&& alias python='python3' \
&& echo "alias python='python3'" >> /etc/profile \
# Also set up boost here, since we copied the download but only just installed bzip2 to work with it \
&& cd ${BOOST_ROOT} \
&& cd /tmp/ngen-deps \
&& tar -xjf boost_${BOOST_VERSION//./_}.tar.bz2 \
&& mv boost_${BOOST_VERSION//./_} ${BOOST_ROOT} \
&& rm boost_${BOOST_VERSION//./_}.tar.bz2 \
&& rm -rf /tmp/ngen-deps

Expand Down

0 comments on commit a34820c

Please sign in to comment.