From fa6e0663c04450811aad1d545fa3017544691a33 Mon Sep 17 00:00:00 2001 From: Jusong Yu Date: Sun, 22 Oct 2023 23:08:19 +0200 Subject: [PATCH] lower bound of aiida-core --- stack/base/Dockerfile | 13 +++++++------ stack/base/requirements.txt | 2 -- 2 files changed, 7 insertions(+), 8 deletions(-) delete mode 100644 stack/base/requirements.txt diff --git a/stack/base/Dockerfile b/stack/base/Dockerfile index 52f77503..3d128203 100644 --- a/stack/base/Dockerfile +++ b/stack/base/Dockerfile @@ -16,20 +16,21 @@ WORKDIR /opt/ ARG AIIDA_VERSION +# Pin shared requirements in the base environemnt. +# The lower bound of aiida-core is set to the version of aiida-core to prevent +# lower aiida-core DB version installed and trigger database downgrade. +RUN echo "pip==23.0.1" > /opt/requirements.txt && \ + echo "aiida-core>=${AIIDA_VERSION},<3" >> /opt/requirements.txt + # Install the shared requirements. -COPY requirements.txt . RUN mamba install --yes \ aiida-core=${AIIDA_VERSION} \ mamba-bash-completion \ - --file requirements.txt \ + --file /opt/requirements.txt \ && mamba clean --all -f -y && \ fix-permissions "${CONDA_DIR}" && \ fix-permissions "/home/${NB_USER}" - -# Pin shared requirements in the base environemnt. -RUN cat requirements.txt | xargs -I{} conda config --system --add pinned_packages {} - # Configure pip to use requirements file as constraints file. ENV PIP_CONSTRAINT=/opt/requirements.txt diff --git a/stack/base/requirements.txt b/stack/base/requirements.txt deleted file mode 100644 index 7db11bce..00000000 --- a/stack/base/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -aiida-core>=2.0.0,<3,!=2.3.0 -pip==23.0.1