From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E170F4585A; Wed, 11 Sep 2024 17:51:22 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 661354029E; Wed, 11 Sep 2024 17:51:22 +0200 (CEST) Received: from mail-yb1-f226.google.com (mail-yb1-f226.google.com [209.85.219.226]) by mails.dpdk.org (Postfix) with ESMTP id A3CEE40267 for ; Wed, 11 Sep 2024 17:51:21 +0200 (CEST) Received: by mail-yb1-f226.google.com with SMTP id 3f1490d57ef6-e1a7f1597bbso899712276.0 for ; Wed, 11 Sep 2024 08:51:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1726069881; x=1726674681; darn=dpdk.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=fmoo9Al0bYTVbNB4r9d3cgqKnMIN30SwTD4Ty3a8O/U=; b=TuSBwPBZC0tb7oBd/gseNtpYFFr9mbZ3lQ6hmsaFXHJuMFgU6+bJTF5BLMLT7SL1NK 1+gYW2OajtNxLabQRWBceB6rl/iuu5rSS0PPExbJ7mEQd+SFhCJKOcw5HehyleDr4PBK yWPpiHP0embkwtt7VCiqd8MEPY42oE4t7oRR0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726069881; x=1726674681; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fmoo9Al0bYTVbNB4r9d3cgqKnMIN30SwTD4Ty3a8O/U=; b=mdqDmnaYaLDkyBqmWpzjlIj+OpGiCEjyEGLSfEhlbLOMIufJICm8SwrgZFJpsNCop2 Brtf0hPe/rWXJ7ixKzy4Im+IXbE35zJZkS+7+F0lCLH6FLXUeDnkmIlbA7RRhK3nDd7g ctghwG3q7kkIe0zhrrjLo/C6N8G4TKjgFiNLGaxJBKD0y1ZfYaap364fgQ793tlM9PCC 2HQdD8VIniLii1l4KzP+SF1N4F4eun76jsrQ1Q3Un3SOwh+rwVXZYziVArCiTPZplN91 f5U25PDWipN/aXReGk1MeI14MeKm9HreSE3mwV9IyfML72Ez/oqb9XwvUq8d9ZbAaFjH oeQg== X-Gm-Message-State: AOJu0Yz2v/Q/qCWg3A+rG55evVR1sfMadzLyevhY84/Llhmfns1FjRmI p6tPTEEyn/vS7ZU4hXGfqsnAKeMzPcESjajnnqO3di5oas/hWmkLo/MHw1sFaWblAQFZk3amzry hj4JyuUiXH4nkuNqiHfyWG1g/ffpTqQf4vGr+jPkFXebHa9ni X-Google-Smtp-Source: AGHT+IHj6qmZ3wZiJJ44wOVk7EZKkL8HTvM3BhA/XBtrmkh8BOdAyJAtSUubUDFXBCPSrJPKGczGbhiIC0yX X-Received: by 2002:a25:8282:0:b0:e0b:b11c:2f42 with SMTP id 3f1490d57ef6-e1d79e8a966mr4727747276.17.1726069880887; Wed, 11 Sep 2024 08:51:20 -0700 (PDT) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [2606:4100:3880:1234::84]) by smtp-relay.gmail.com with ESMTPS id 3f1490d57ef6-e1d7bbb7c6dsm191855276.34.2024.09.11.08.51.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Sep 2024 08:51:20 -0700 (PDT) X-Relaying-Domain: iol.unh.edu Received: from iol.unh.edu (unknown [IPv6:2606:4100:3880:1257::1083]) by postal.iol.unh.edu (Postfix) with ESMTP id BD7156050A6D; Wed, 11 Sep 2024 11:51:04 -0400 (EDT) From: jspewock@iol.unh.edu To: paul.szczepanek@arm.com, npratte@iol.unh.edu, alex.chapman@arm.com, Honnappa.Nagarahalli@arm.com, juraj.linkes@pantheon.tech, Luca.Vizzarro@arm.com, probb@iol.unh.edu, thomas@monjalon.net, yoan.picchi@foss.arm.com, wathsala.vithanage@arm.com Cc: dev@dpdk.org, Jeremy Spewock Subject: [PATCH v1] dts: fix runner target in the Dockerfile Date: Wed, 11 Sep 2024 11:50:58 -0400 Message-ID: <20240911155058.11321-1-jspewock@iol.unh.edu> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Jeremy Spewock Currently the runner target in the Dockerfile attempts to run the `poetry install` command when building the image, but this fails due to poetry not being found in the container. Poetry is installed in a previous step with pipx, but doing so adds the binary to use poetry to ~/.local/bin which isn't present in the PATH variable in the container image. The command `pipx ensurepath` fixes this issue in most cases, but it requires a restart of the shell in order for the changes to take place which is not something that is done in the runner target. To solve this problem this patch manually adds ~/.local/bin to PATH in the runner target. Additionally, the command for installing poetry in the runner target uses the depreciated flag --no-dev which is removed in this patch and replaced with the new method of doing the same thing alongside the --no-root flag from the DTS documentation. Fixes: 19082c1fac43 ("dts: add Dockerfile") Cc: juraj.linkes@pantheon.tech Signed-off-by: Jeremy Spewock --- dts/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dts/Dockerfile b/dts/Dockerfile index a81e46c41a..66b3cfd97f 100644 --- a/dts/Dockerfile +++ b/dts/Dockerfile @@ -24,7 +24,10 @@ FROM base AS runner # It bakes DTS into the image during the build. COPY . /dpdk/dts -RUN poetry install --no-dev +# Adds ~/.local/bin to PATH so that packages installed with pipx are callable. `pipx ensurepath` +# fixes this issue, but requires the shell to be re-opened which isn't an option for this target. +ENV PATH="$PATH:/root/.local/bin" +RUN poetry install --only main --no-root CMD ["poetry", "run", "python", "main.py"] -- 2.46.0