aboutsummaryrefslogtreecommitdiff
path: root/tools/docker
diff options
context:
space:
mode:
authorTom Rini2023-03-23 14:57:58 -0400
committerTom Rini2023-04-04 12:24:29 -0400
commit866f30205b50e0fc9834852f46def55bf84c20a5 (patch)
treef702ddb6dba98ac4917527ac74ccc1b3a518353d /tools/docker
parent046b8ef438a26713f94b38d1aa8e131d8049921b (diff)
Dockerfile: Populate a pip cache
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@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/docker')
-rw-r--r--tools/docker/Dockerfile11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile
index bd02531be24..20c2b2a9d64 100644
--- a/tools/docker/Dockerfile
+++ b/tools/docker/Dockerfile
@@ -265,6 +265,17 @@ 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. Get these via wget as the
+# COPY / ADD directives don't work as we need them to.
+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
+
# Create the buildman config file
RUN /bin/echo -e "[toolchain]\nroot = /usr" > ~/.buildman
RUN /bin/echo -e "kernelorg = /opt/gcc-12.2.0-nolibc/*" >> ~/.buildman