Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace --no-cache-dir with PIP_NO_CACHE_DIR=1 #212

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Aug 9, 2024

Makes the pip install commands a bit shorter and easier to read.

Also add PIP_DISABLE_PIP_VERSION_CHECK=1, prevents warnings like this that sometimes shows up:

WARNING: You are using pip version 22.0.4; however, version 24.2 is available.
You should consider upgrading via the '/usr/local/bin/python3.9 -m pip install --upgrade pip' command.

Also use ARG instead of ENV:

  • ARG - only available during the build
  • ENV - also available inside the image

https://vsupalov.com/docker-arg-env-variable-guide/#arg-and-env
https://docs.docker.com/build/building/variables/

@radarhere
Copy link
Member

The 'wheel-build' job failures here would be fixed by python-pillow/Pillow#8293

@radarhere
Copy link
Member

Rather than ignoring the warning, is there a reason we don't upgrade pip first?

@hugovk
Copy link
Member Author

hugovk commented Aug 10, 2024

Hmm, we could do, although we're currently getting the warning here:

RUN bash -c "python3.9 -m pip install virtualenv \
&& python3.9 -m virtualenv --system-site-packages /vpy3 \
&& /vpy3/bin/pip install --no-cache-dir --upgrade pip \
&& /vpy3/bin/pip install --no-cache-dir cffi olefile pytest pytest-cov pytest-timeout \
&& /vpy3/bin/pip install --no-cache-dir numpy --only-binary=:all: || true \
&& chown -R pillow:pillow /vpy3"

We only use system pip to install virtualenv, then we do upgrade pip inside the virtualenv before installing other stuff.

@radarhere radarhere merged commit 0d6502d into python-pillow:main Sep 9, 2024
20 checks passed
@hugovk hugovk deleted the PIP_NO_CACHE_DIR branch September 9, 2024 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants