From bf146df0797974e87994e6563f296fab0b5bf38c Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Tue, 23 Jul 2024 13:33:39 +0100 Subject: [PATCH] Add pip.conf (#485) PIP_USER envvar affects all pip subcommands, including `pip list` which had unintended side effects. Using the pip.conf file allows to set `--user` specificall for the `install` subcommand. --- stack/base/Dockerfile | 2 +- stack/base/pip.conf | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 stack/base/pip.conf diff --git a/stack/base/Dockerfile b/stack/base/Dockerfile index 25e5091d..99cbdad0 100644 --- a/stack/base/Dockerfile +++ b/stack/base/Dockerfile @@ -42,7 +42,7 @@ RUN cat /opt/requirements.txt | xargs -I{} conda config --system --add pinned_pa # Configure pip to use the same requirements file as constraints file. ENV PIP_CONSTRAINT /opt/requirements.txt # Ensure that pip installs packages to ~/.local by default -ENV PIP_USER 1 +COPY pip.conf /etc/pip.conf # Upgrade pip and mamba to latest # Install aiida-core and other shared requirements. diff --git a/stack/base/pip.conf b/stack/base/pip.conf new file mode 100644 index 00000000..5c0e8830 --- /dev/null +++ b/stack/base/pip.conf @@ -0,0 +1,2 @@ +[install] +user = true