diff --git a/.github/Dockerfile b/.github/Dockerfile index c6a08d8e71..5b86e0f711 100644 --- a/.github/Dockerfile +++ b/.github/Dockerfile @@ -15,17 +15,17 @@ RUN apt-get update -y && \ if [ "$TARGET" != "gpu" ]; then \ apt-get install -y \ build-essential git make cmake gcc g++ gfortran bc \ - python3.11 python3.11-venv python3-pip \ + python3.12 python3.12-venv python3-pip \ openmpi-bin libopenmpi-dev libfftw3-dev \ mpich libmpich-dev; \ else \ apt-get install -y \ build-essential git make cmake bc \ - python3.11 python3.11-venv python3-pip \ + python3.12 python3.12-venv python3-pip \ libfftw3-dev \ openmpi-bin libopenmpi-dev; \ fi && \ - update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 2 && \ + update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 2 && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ENV OMPI_ALLOW_RUN_AS_ROOT=1 @@ -40,6 +40,13 @@ ENV FC=${FC_COMPILER} ENV PATH="${COMPILER_PATH}:$PATH" ENV LD_LIBRARY_PATH="${COMPILER_LD_LIBRARY_PATH}:${LD_LIBRARY_PATH:-}" +# Pre-install numpy into the venv before mfc.sh runs, as it's required at +# build time by several dependencies (pandas, cantera, matplotlib, etc.) that +# may need to compile from source on architectures without pre-built wheels +RUN python3.12 -m venv /opt/MFC/build/venv && \ + /opt/MFC/build/venv/bin/pip install --upgrade pip && \ + /opt/MFC/build/venv/bin/pip install numpy + RUN echo "TARGET=$TARGET CC=$CC_COMPILER FC=$FC_COMPILER" && \ cd /opt/MFC && \ if [ "$TARGET" = "gpu" ]; then \ diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index b12c6cdc5f..e905aae794 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -54,7 +54,7 @@ jobs: TAG="${{ github.event.inputs.tag || github.ref_name }}" echo "tag=$TAG" >> $GITHUB_OUTPUT echo "TAG=$TAG" >> $GITHUB_ENV - git clone --branch "$TAG" --depth 1 https://github.com/MFlowCode/MFC.git mfc + git clone --branch "$TAG" --depth 1 ${{ github.server_url }}/${{ github.repository }}.git mfc - name: Stage run: |