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 B3E04459B2; Mon, 16 Sep 2024 19:29:10 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7BB754025F; Mon, 16 Sep 2024 19:29:10 +0200 (CEST) Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by mails.dpdk.org (Postfix) with ESMTP id 8037840150 for ; Mon, 16 Sep 2024 19:29:09 +0200 (CEST) Received: by mail-pj1-f49.google.com with SMTP id 98e67ed59e1d1-2d8a4bad409so3249884a91.0 for ; Mon, 16 Sep 2024 10:29:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1726507748; x=1727112548; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=09vFhDlnu70dsimI6Z62gMZt/DaGan2ttN7ZbWLPS7E=; b=IdyzF7rXXEnV5BzNswLQvqbsSPFMkoqhyBocO6hzmg+1RWfygjHuukWqnSQhjUcERG JGts9FvLHT2oyzL9GWQtLR2wF/nYOSUt+Xd4QHNW0AcBIFvdwRa6pJu1lo8ydKchw9v6 aXa8hy69yZg81/XNy1pgaJU4zOfOiSpmf9Eso= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726507748; x=1727112548; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=09vFhDlnu70dsimI6Z62gMZt/DaGan2ttN7ZbWLPS7E=; b=ppYdPlM63+p0kxOAjdQoyaEBqhXcnQ7D+RVL13ALnqwVss9EbG3ElHP+Zwu5P2MKpv wvP9ITAdJpmceDutDSSgoBafdvbs0GX+B1NwHLjEobdApeGeOSLoSo1VxrT9++7s0o7z f5cTit/a4BbUAbJsl+lQ4mExufhgauRuc6auj0c32TPFDswdxcgQYWTBsHOLW5QRd/cx 04iiN3TQK1olJ1AUc5dm72hQfkyzTYZ3XIxaLGHW/q2K7ocePveG/gmDsxd1vzE2esMH 5DIk34exiVzDjuZE9nWBDP50lZoIY672KxF1+ZwCeZymCyDXhvVS1IuAg2X90F3hFuUf Ebgw== X-Forwarded-Encrypted: i=1; AJvYcCX80jamHAF0qhAhWVCa6UbvZZRO9Y7mlSvrojDKTiwQhUhwCZGzCLlbUjKFoaPYt7B1d4I=@dpdk.org X-Gm-Message-State: AOJu0YwZcB5pIO04wZh5ifHnqOf9mvYA0d5jde7yf9Y0dKXxoy2XX2ef Hucr8i9JMZIc8V8gxUJ6k23bVPjOSBUjTTKCo+97it9f3HhqL3hWQPB9jd0zR1jYuBpkAW7uEQ7 fpzM1TGnfEEwTxWTTSPRc1X2GprBWmhqFfe2N7w== X-Google-Smtp-Source: AGHT+IGKA22GrLjxMl8eRKHr2s/8Cibk6z4oqfwf7KveZ9wGP48TA3OWnaiSbXwjmaWbLLiK2tdjrpjTLdRZR2wYd3M= X-Received: by 2002:a17:90a:3fc2:b0:2d8:27c3:87d7 with SMTP id 98e67ed59e1d1-2db9ffaefd8mr18865474a91.8.1726507748424; Mon, 16 Sep 2024 10:29:08 -0700 (PDT) MIME-Version: 1.0 References: <20240911155058.11321-1-jspewock@iol.unh.edu> In-Reply-To: From: Jeremy Spewock Date: Mon, 16 Sep 2024 13:28:57 -0400 Message-ID: Subject: Re: [PATCH v1] dts: fix runner target in the Dockerfile To: =?UTF-8?Q?Juraj_Linke=C5=A1?= Cc: paul.szczepanek@arm.com, npratte@iol.unh.edu, alex.chapman@arm.com, Honnappa.Nagarahalli@arm.com, Luca.Vizzarro@arm.com, probb@iol.unh.edu, thomas@monjalon.net, yoan.picchi@foss.arm.com, wathsala.vithanage@arm.com, dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Mon, Sep 16, 2024 at 6:16=E2=80=AFAM Juraj Linke=C5=A1 wrote: > > > > On 11. 9. 2024 17:50, jspewock@iol.unh.edu wrote: > > 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, bu= t > > 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 c= allable. `pipx ensurepath` > > +# fixes this issue, but requires the shell to be re-opened which isn't= an option for this target. > > +ENV PATH=3D"$PATH:/root/.local/bin" > > +RUN poetry install --only main --no-root > > There's a patch from Dean that removed --no-root. I suggest waiting for > Dean to submit v2, then you rebase on top of that and I'll merge both of > these as we seem to have the tags. I didn't know about this change but this makes sense to me. There is one other version that I'll submit here before Dean puts out his V2 since we had further discussion on slack about it potentially being beneficial to add an ENTRYPOINT to the dockerfile, as well as fixing the missing git package. > > > > > CMD ["poetry", "run", "python", "main.py"] > > >