Skip to content

Commit

Permalink
Add pip.conf (#485)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
danielhollas authored Jul 23, 2024
1 parent e6fab3c commit bf146df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stack/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions stack/base/pip.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[install]
user = true

0 comments on commit bf146df

Please sign in to comment.