[PATCH 1/2] Dockerfile: Populate a pip cache

Tom Rini trini at konsulko.com
Thu Mar 23 19:58:33 CET 2023


On Fri, Mar 24, 2023 at 07:28:32AM +1300, Simon Glass wrote:
> Hi Tom,
> 
> On Thu, 23 Mar 2023 at 08:19, Tom Rini <trini at konsulko.com> wrote:
> >
> > Given the number of jobs in CI we have which use python and pip install
> > packages, we should do this once in the Dockerfile, in order to populate
> > the cache. We let each job continue to create and use the virtual
> > environments they need to facilitate making updates to these
> > environments easier.
> >
> > Signed-off-by: Tom Rini <trini at konsulko.com>
> > ---
> >  tools/docker/Dockerfile | 13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> 
> Reviewed-by: Simon Glass <sjg at chromium.org>
> 
> >
> > diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile
> > index bd02531be249..27205002005c 100644
> > --- a/tools/docker/Dockerfile
> > +++ b/tools/docker/Dockerfile
> > @@ -265,6 +265,19 @@ RUN echo uboot ALL=NOPASSWD: ALL > /etc/sudoers.d/uboot
> >  RUN useradd -m -U uboot
> >  USER uboot:uboot
> >
> > +# Populate the cache for pip to use
> > +RUN wget -O /tmp/pytest-requirements.txt https://source.denx.de/u-boot/u-boot/-/raw/master/test/py/requirements.txt
> > +RUN wget -O /tmp/sphinx-requirements.txt https://source.denx.de/u-boot/u-boot/-/raw/master/doc/sphinx/requirements.txt
> > +RUN virtualenv -p /usr/bin/python3 /tmp/venv && \
> > +       . /tmp/venv/bin/activate && \
> > +       pip install -r /tmp/pytest-requirements.txt \
> > +               -r /tmp/sphinx-requirements.txt && \
> > +       deactivate && \
> > +       rm -rf /tmp/venv /tmp/pytest-requirements.txt /tmp/sphinx-requirements.txt
> > +#RUN pip download -r /tmp/pytest-requirements.txt \
> > +#      -r /tmp/sphinx-requirements.txt && \
> > +#      rm -f /tmp/pytest-requirements.txt /tmp/sphinx-requirements.txt
> 
> What are those lines for? Can you add a comment?

Oh heck, I sent the wrong two patches from the branch, that's why.
Thanks.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230323/236f782b/attachment.sig>


More information about the U-Boot mailing list