diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 26ef26c088..691265ae89 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -181,7 +181,7 @@ jobs: - name: Install from source distribution run : | # Install natcap.invest from the sdist in dist/ - pip install $(find dist -name "natcap.invest*") + pip install $(find dist -name "natcap[._-]invest*") # Model tests should cover model functionality, we just want # to be sure that we can import `natcap.invest` here. diff --git a/docker/Dockerfile b/docker/Dockerfile index ab38b0a139..496948c370 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -13,11 +13,15 @@ RUN cd / && \ # Create the container for distribution that has runtime dependencies. FROM mambaorg/micromamba:1.5.0-bookworm-slim +# Python version should match the version used in stage 1. +# If we update the stage 1 debian version, also update this python version +ARG PYTHON_VERSION="3.11" COPY --from=build /invest/dist/*.whl /tmp/ # The environment.yml file will be built during github actions. COPY --chown=$MAMBA_USER:$MAMBA_USER environment.yml /tmp/environment.yml -RUN micromamba install -y -n base -c conda-forge -f /tmp/environment.yml && \ +RUN micromamba install -y -n base -c conda-forge python==${PYTHON_VERSION} && \ + micromamba install -y -n base -c conda-forge -f /tmp/environment.yml && \ micromamba clean --all --yes && \ /opt/conda/bin/python -m pip install /tmp/*.whl && \ /opt/conda/bin/python -m pip cache purge && \