Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Fixed problems with Linux build
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Aug 12, 2023
1 parent 7205614 commit 275a2cb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
17 changes: 9 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,19 @@
# This build target compiles all dependencies and the swiftest driver itself
ARG BUILDIMAGE="intel/oneapi-hpckit:2023.1.0-devel-ubuntu20.04"
FROM ${BUILDIMAGE} as build-deps
ARG BUILDIMAGE="intel/oneapi-hpckit:2023.1.0-devel-ubuntu20.04"
ENV SCRIPT_DIR="buildscripts"
SHELL ["/bin/bash", "--login", "-c"]
ENV SHELL="/bin/bash"
WORKDIR /swiftest

# Compile the dependencies
COPY ./buildscripts/fetch_dependencies.sh ./buildscripts/
COPY ./buildscripts/get_platform.sh ./buildscripts/
COPY ./buildscripts/make_build_environment.sh ./buildscripts/
COPY ./buildscripts/build_dependencies.sh ./buildscripts/
COPY ./buildscripts/swiftest-build-env.yml ./buildscripts/
RUN ${SCRIPT_DIR}/fetch_dependencies.sh
COPY ./${SCRIPT_DIR}/get_platform.sh ./${SCRIPT_DIR}/
COPY ./${SCRIPT_DIR}/make_build_environment.sh ./${SCRIPT_DIR}
COPY ./${SCRIPT_DIR}/build_dependencies.sh ./${SCRIPT_DIR}/
COPY ./${SCRIPT_DIR}/swiftest-build-env.yml ./${SCRIPT_DIR}/
COPY ./${SCRIPT_DIR}/fetch_dependencies.sh ./${SCRIPT_DIR}/
RUN ${SCRIPT_DIR}/fetch_dependencies.sh
RUN if [ "$BUILDIMAGE" = "intel/oneapi-hpckit:2023.1.0-devel-ubuntu20.04" ]; then \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends m4 && \
Expand All @@ -35,7 +36,7 @@ RUN if [ "$BUILDIMAGE" = "intel/oneapi-hpckit:2023.1.0-devel-ubuntu20.04" ]; the
else \
${SCRIPT_DIR}/make_build_environment.sh && \
echo "conda activate swiftest-build-env" >> ~/.bashrc && \
/bin/bash -lic "${SCRIPT_DIR}/build_dependencies.sh GNU"; \
/bin/bash -lic "${SCRIPT_DIR}/build_dependencies.sh GNU-Linux"; \
fi

FROM ${BUILDIMAGE} as build-swiftest
Expand Down Expand Up @@ -66,7 +67,7 @@ ENV PIP_ROOT_USER_ACTION=ignore
RUN if [ "$BUILDIMAGE" = "intel/oneapi-hpckit:2023.1.0-devel-ubuntu20.04" ]; then \
/bin/bash -lic "${SCRIPT_DIR}/build_swiftest.sh Intel"; \
else \
/bin/bash -lic "${SCRIPT_DIR}/build_swiftest.sh GNU"; \
/bin/bash -lic "${SCRIPT_DIR}/build_swiftest.sh GNU-Linux"; \
fi

#Export the generated wheel file to the host machine
Expand Down
1 change: 1 addition & 0 deletions buildscripts/build_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ cd ../netcdf-c-4.9.2
make distclean
./configure --disable-shared \
--disable-dap \
--disable-libxml2 \
--disable-byterange \
--prefix=${INSTALL_DIR}
make
Expand Down

0 comments on commit 275a2cb

Please sign in to comment.