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 ED7EAC6FD1C for ; Thu, 23 Mar 2023 18:58:20 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 03C65857F0; Thu, 23 Mar 2023 19:58:08 +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="boKwijmm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2697B85720; Thu, 23 Mar 2023 19:58:05 +0100 (CET) Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) (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 EEF078576A for ; Thu, 23 Mar 2023 19:58:01 +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-x82e.google.com with SMTP id hf2so23593527qtb.3 for ; Thu, 23 Mar 2023 11:58:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1679597880; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=DzJWsXRcBmS6tjxTMYGjF+PJHteR6bXAQkzeyV1cJY8=; b=boKwijmm7mAKRVPWRx0WaCyOCq6LjoNsRxoZcw0RW5prAZEbsSkpEm2UM+9jH5tq+Z nYIm0zB+VyzKayERsAv7vis2K0knHhlCCkCM+u/6DI08i4XYPB9tRORZrG2PlxWRLqNw KYVFWthHb5MPH8RYtQ/mhwoVg9Z9XkO3WBFeQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679597880; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DzJWsXRcBmS6tjxTMYGjF+PJHteR6bXAQkzeyV1cJY8=; b=Z4/WxdxWwUbc7SbtBvDwW4VYLd0MtMGVLNPM6Wlu84hOmBXC+om+6FYzOHlFvfi4+y 6sY+40Dj/LNOC2FdlRZdSrOwF9WYNE5foblJDsZ+AD+Ip3PN98uzhetfXhSGiR0ZIUbn Wds+zKzub/W3qcseFhoHIcgB3Es4Y6uzHxXmOUCCl2bxlCzWm+lyZqVRnwT86gr08ADE oNa9MJW580zDlwd1sQQ+wZ7EYb4fVwpg3js2agO5CfO8R9HDN7WoXEy5PXbWd2yRIvyx qNqnxlAyjqBis9TwD30LOPMkf6EL+fIAlFvw/hzwZCASoe9lEY7/X7r2YxDm7dFTdMBy GLIg== X-Gm-Message-State: AO0yUKVJ3H3HNwdlQ433yNdOVkraI9+Ov1ftwCB3R/2Oj9BQhTrrRK3L eMvZlbOu9YO3WUyy+aLgUPnkrI5VHjs1I194cmbJbQ== X-Google-Smtp-Source: AK7set+9I+ZlLuSbQTUtowGgup5NcgvIP7poSPjXRmZ5MFRMFSZtJKD4/P3FKdD3FQM7YcdFIX3v2g== X-Received: by 2002:ac8:5906:0:b0:3bf:e15f:935c with SMTP id 6-20020ac85906000000b003bfe15f935cmr767268qty.14.1679597880572; Thu, 23 Mar 2023 11:58:00 -0700 (PDT) Received: from bill-the-cat.lan (2603-6081-7b00-6400-fe1d-4555-71ea-96cf.res6.spectrum.com. [2603:6081:7b00:6400:fe1d:4555:71ea:96cf]) by smtp.gmail.com with ESMTPSA id d184-20020a3768c1000000b0074688c36facsm8139784qkc.56.2023.03.23.11.58.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Mar 2023 11:58:00 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [v2 2/2] Dockerfile: Populate a pip cache Date: Thu, 23 Mar 2023 14:57:58 -0400 Message-Id: <20230323185758.3220923-2-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230323185758.3220923-1-trini@konsulko.com> References: <20230323185758.3220923-1-trini@konsulko.com> 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 --- Changes in v2: - Comment on why we wget - Drop commented out portion --- tools/docker/Dockerfile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index bd02531be249..20c2b2a9d64c 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 -- 2.34.1