From: "Juraj Linkeš" <juraj.linkes@pantheon.tech>
To: Jeremy Spewock <jspewock@iol.unh.edu>
Cc: npratte@iol.unh.edu, probb@iol.unh.edu,
wathsala.vithanage@arm.com, yoan.picchi@foss.arm.com,
paul.szczepanek@arm.com, alex.chapman@arm.com,
Luca.Vizzarro@arm.com, thomas@monjalon.net,
Honnappa.Nagarahalli@arm.com, dev@dpdk.org
Subject: Re: [PATCH v2] dts: fix runner target in the Dockerfile
Date: Thu, 19 Sep 2024 09:09:10 +0200 [thread overview]
Message-ID: <892c0bba-26dc-4078-9dfd-ec3b5d1f6727@pantheon.tech> (raw)
In-Reply-To: <CAAA20UTyhy0r36-xRj0q_zuyt2cMyZL-eG+Af5OciyAroXnrqg@mail.gmail.com>
On 18. 9. 2024 16:16, Jeremy Spewock wrote:
> On Wed, Sep 18, 2024 at 3:57 AM Juraj Linkeš <juraj.linkes@pantheon.tech> wrote:
>>
>>
>>> diff --git a/dts/Dockerfile b/dts/Dockerfile
>>
>>> @@ -24,9 +27,12 @@ FROM base AS runner
>>
>>> +# 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.
>>
>> Let's explain this a bit more, I don't really know why this isn't an option.
>
> The main reason it isn't an option is it is all happening in the same
> `docker build` process and it seems like however Docker is deciding to
> create the layers isn't refreshing the terminal. I don't think there
> is a way we could make it do so, but I can swap the "isn't an option"
> part of the comment for something more like "and the build process
> does not refresh the terminal in the required way before creating the
> next layer."
>
Yea I think that's because each layer is basically independent so env
vars (likely set by `pipx ensurepath`) don't persist.
I understand it now. The were multiple confusing things (how does `pipx
ensurepath` relate to ~/.local/bin, how does `pipx ensurepath` fix which
issue, why is shell mentioned and what option is not an option and why
for this target and not the other and possibly more). It basically
raised more questions than answered. :-)
I would just say:
pipx installs packages in ~/.local/bin, which is not in PATH by default.
The `pipx ensurepath` command (which sets the path) called in the
previous step only works in that step as the docker build process
doesn't preserve env variables between steps.
Or something like that.
>>
>>> +ENV PATH="$PATH:/root/.local/bin"
>>> +RUN poetry install --only main --no-root
>>>
>>> -CMD ["poetry", "run", "python", "main.py"]
>>> +ENTRYPOINT ["poetry", "run", "python", "main.py"]
>>>
next prev parent reply other threads:[~2024-09-19 7:09 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-11 15:50 [PATCH v1] " jspewock
2024-09-11 15:52 ` Luca Vizzarro
2024-09-11 17:26 ` Patrick Robb
2024-09-16 10:16 ` Juraj Linkeš
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š [this message]
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=892c0bba-26dc-4078-9dfd-ec3b5d1f6727@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).