Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F084CC6FD1C for ; Wed, 22 Mar 2023 19:19:24 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7797485D97; Wed, 22 Mar 2023 20:19:12 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="da5xdhcl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0290285A82; Wed, 22 Mar 2023 20:19:01 +0100 (CET) Received: from mail-qt1-x82f.google.com (mail-qt1-x82f.google.com [IPv6:2607:f8b0:4864:20::82f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A56E9800AC for ; Wed, 22 Mar 2023 20:18:57 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x82f.google.com with SMTP id x1so24014434qtr.7 for ; Wed, 22 Mar 2023 12:18:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1679512736; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=it5o2a0ZEC+bbsWldycLnNaNNq2aKF45um+maTl+Kx4=; b=da5xdhcluDP9XtfsSJAQjGjnYtMo0d6ChJe8riyIZgRQABsubq7MM4anJCzO0kDJrC MwPL1Sj2gaPS5VgvykwSmFzop87aTJo7HlyMI+DVZ2IPRMwp2pB7wtwUXy7HhlFyAkKd ybc8xfbAra4+30nTCs93URg0A8ehkyboyPLuQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679512736; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=it5o2a0ZEC+bbsWldycLnNaNNq2aKF45um+maTl+Kx4=; b=j7PtBsYNRXYpmN06KM2GB9IalEJ0MB6NYAPWYM4hFQExDMreDjYZPi7YytCYfmZT3w vcxdQlSjW35qFTwHDo7I0eePXLrIvE3O131VzgzXX+xI9D3jMJuWjk7/qeOqGf45X5Yp ER7atpq/4Ie3o+RB3SLN3NhME8tYSUx/ygID6xT2lE1EZ7Cb0e89sMMSJNZRfLHlPNVr pIjizDocN26iQhk3zJETxUSxhMgGUPqQVuwuT6FwZaIRuoZaqhiR6xcNscO3kK3xyuRh qdEgSm33x+JwlpTlHnACvhcPlwzaaadOb+LTZAWQOeQG/EBC2GHCETi0luW0fxBklR/J A+Mg== X-Gm-Message-State: AO0yUKX0XrzmoQGsGSabi59S2uYpU81KsW0l2jaBcdjPs7jXxiffMr60 xqenyznhZucOLyraqH68UyU6Jt+P/1GQmy6f5EgLmA== X-Google-Smtp-Source: AK7set8GBYEpuGpob+oZh9Ym3+7toQ1jBxkJnOktrAC97ihLIaFgCKF14Msubuf+fneQx8AJudHXTg== X-Received: by 2002:ac8:7d12:0:b0:3db:575e:613a with SMTP id g18-20020ac87d12000000b003db575e613amr8481094qtb.23.1679512736077; Wed, 22 Mar 2023 12:18:56 -0700 (PDT) Received: from bill-the-cat.lan (2603-6081-7b00-6400-8fb4-da0c-fb38-955c.res6.spectrum.com. [2603:6081:7b00:6400:8fb4:da0c:fb38:955c]) by smtp.gmail.com with ESMTPSA id b5-20020ac84f05000000b003b82a07c4d6sm10612556qte.84.2023.03.22.12.18.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Mar 2023 12:18:55 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [PATCH 1/2] Dockerfile: Populate a pip cache Date: Wed, 22 Mar 2023 15:18:53 -0400 Message-Id: <20230322191854.3843813-1-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean 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 --- tools/docker/Dockerfile | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 + # 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 -- 2.34.1