From: Jeremy Spewock <jspewock@iol.unh.edu>
To: "Juraj Linkeš" <juraj.linkes@pantheon.tech>
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 10:12:35 -0400 [thread overview]
Message-ID: <CAAA20UTmHZzhRuDvfYXR4bB1CH4-refrK2hA42d5Vw8w=fnNow@mail.gmail.com> (raw)
In-Reply-To: <892c0bba-26dc-4078-9dfd-ec3b5d1f6727@pantheon.tech>
On Thu, Sep 19, 2024 at 3:09 AM Juraj Linkeš <juraj.linkes@pantheon.tech> wrote:
>
>
>
> 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
What's interesting as well is the pipx ensurepath command does fix the
issue when you start the interactive dev target. So it doesn't persist
between layers, but it does in the final container.
> 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"]
> >>>
>
--
*Let's Connect!*
... *October Webinars*
Ask Us Anything: IOL Services
Open Q&A
<https://unh.zoom.us/webinar/register/9017265932716/WN_OUo5S7iQRLmKKY7CsmwZhw#/registration>Your
questions. Our answers. Let's get started.
Oct 3rd
Live Tour of INTACT®
for IPv6 Testing and Validation
<https://unh.zoom.us/webinar/register/7117231236474/WN_I2zfyi_2S2yEiXkxBRi8sA#/registration>
Open tour. Open Q&A. See why we think you'll love INTACT.
Oct 9th
How to
Prep for Our NVMe® Plugfest #21
<https://unh.zoom.us/webinar/register/4017266809553/WN_X1iA2SZ8QhmcGboF2DImNg#/registration>
Checklists. Conversation. Let's get ready to plugin!
Oct 15th
... *
Newsletter*
*
*
Get the IOL Connector
<https://www.iol.unh.edu/news/email-newsletters> for our lastest news and
event info.
.
next prev parent reply other threads:[~2024-09-19 14:12 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š
2024-09-19 14:12 ` Jeremy Spewock [this message]
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='CAAA20UTmHZzhRuDvfYXR4bB1CH4-refrK2hA42d5Vw8w=fnNow@mail.gmail.com' \
--to=jspewock@iol.unh.edu \
--cc=Honnappa.Nagarahalli@arm.com \
--cc=Luca.Vizzarro@arm.com \
--cc=alex.chapman@arm.com \
--cc=dev@dpdk.org \
--cc=juraj.linkes@pantheon.tech \
--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).