From: "Juraj Linkeš" <juraj.linkes@pantheon.tech>
To: jspewock@iol.unh.edu, 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
Cc: dev@dpdk.org
Subject: Re: [PATCH v1] dts: fix runner target in the Dockerfile
Date: Mon, 16 Sep 2024 12:16:21 +0200 [thread overview]
Message-ID: <cf9ee729-8779-4b87-b3cd-3b74569f36ce@pantheon.tech> (raw)
In-Reply-To: <20240911155058.11321-1-jspewock@iol.unh.edu>
On 11. 9. 2024 17:50, jspewock@iol.unh.edu wrote:
> From: Jeremy Spewock <jspewock@iol.unh.edu>
>
> 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 <jspewock@iol.unh.edu>
> ---
> 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
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.
>
> CMD ["poetry", "run", "python", "main.py"]
>
next prev parent reply other threads:[~2024-09-16 10:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-11 15:50 jspewock
2024-09-11 15:52 ` Luca Vizzarro
2024-09-11 17:26 ` Patrick Robb
2024-09-16 10:16 ` Juraj Linkeš [this message]
2024-09-16 17:28 ` Jeremy Spewock
2024-09-16 18:14 ` [PATCH v2] " jspewock
2024-09-17 9:50 ` Luca Vizzarro
2024-09-17 15:22 ` Patrick Robb
2024-09-18 7:44 ` Juraj Linkeš
2024-09-18 7:57 ` Juraj Linkeš
2024-09-18 14:16 ` Jeremy Spewock
2024-09-19 7:09 ` Juraj Linkeš
2024-09-19 14:12 ` Jeremy Spewock
2024-09-19 9:36 ` Juraj Linkeš
2024-09-19 11:28 ` Juraj Linkeš
2024-09-19 14:24 ` [PATCH v3] " jspewock
2024-09-19 14:34 ` Luca Vizzarro
2024-09-19 14:35 ` Juraj Linkeš
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cf9ee729-8779-4b87-b3cd-3b74569f36ce@pantheon.tech \
--to=juraj.linkes@pantheon.tech \
--cc=Honnappa.Nagarahalli@arm.com \
--cc=Luca.Vizzarro@arm.com \
--cc=alex.chapman@arm.com \
--cc=dev@dpdk.org \
--cc=jspewock@iol.unh.edu \
--cc=npratte@iol.unh.edu \
--cc=paul.szczepanek@arm.com \
--cc=probb@iol.unh.edu \
--cc=thomas@monjalon.net \
--cc=wathsala.vithanage@arm.com \
--cc=yoan.picchi@foss.arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).