I am trying to build a Python project in a Dockerfile. I want to cache dependencies, and then use that cache later, something like this:
RUN pip3 download -d "/pth/to/downloaded/files" -r /temp/requirements.txt -c /temp/constraints.txt
# much later on in the Dockerfile:
RUN pip3 install --download-cache="/pth/to/downloaded/files" -r requirements.txt -c constraints.txt
Question: Assuming the pip3 download
command is correct, I no longer see a --download-cache
option when I look at the pip3 --help
output - is there a new option I can use with pip3 install
to reference the dependency cache generated by pip3 download
?
Right now I am getting this error:
Usage: pip install [options]
no such option: --download-cache
from How to cache Python dependencies properly
No comments:
Post a Comment