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 66019459D7; Thu, 19 Sep 2024 16:12:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2B90E40A7D; Thu, 19 Sep 2024 16:12:49 +0200 (CEST) Received: from mail-pg1-f176.google.com (mail-pg1-f176.google.com [209.85.215.176]) by mails.dpdk.org (Postfix) with ESMTP id D25EE406FF for ; Thu, 19 Sep 2024 16:12:47 +0200 (CEST) Received: by mail-pg1-f176.google.com with SMTP id 41be03b00d2f7-7cd8803fe0aso627598a12.0 for ; Thu, 19 Sep 2024 07:12:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1726755167; x=1727359967; 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=JGzEa0IJLV6FRG/bNObdjLBop30pMTaaAulW3jf7/t4=; b=HBKpV2TNt2kUF1cIaBSY4Cr/V65U9efyaMTrJVQtsZnL25NbR8GRiOA5KFZYyofOc/ yEHuqLsTDyIHzF0y8XXbuKdeJ/BOgs8ugZWWw1PNzjsQn9y/hA04BEUeqdprZ30cPLAj BYkKoqNv+b7kfE5nyAzlruo0G8vyJ+wA5jS5Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726755167; x=1727359967; 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=JGzEa0IJLV6FRG/bNObdjLBop30pMTaaAulW3jf7/t4=; b=YavtpPvnpjpEqdgVk+GFReCYExoeCGYv/WUyu/4SuEEhcW6IBPC2JDZlTHvb29z54r 69T11369c5cl3VW6HtNXmladmHYdevQJjubYUv5WbZgogUrYGZNq9ZtQ1Zip2q6rjHj9 /o76DjCQJrkGzqy8hwdLWKTKTvdZIdZqSlfRsIZs6RsZH2oY21D/LYrleZeT00n8Ltyy 2MTar8V/W4FMzm/RfsNB1/nlaOWwy7RtGqVvEK9CiwGiDY58WihTdY/EksKh45Z/wqrh 0D8edRxLlTzwMLgxd49csJ1ybjSpfTAHhvPJ3YVPLQ1WmuCyuNpzXw/o5Q7vkG1N24tQ gz5A== X-Forwarded-Encrypted: i=1; AJvYcCW960zroPjoqQ+LsCKnpQ73t4m4JstFyrdvAgI+QwjMKAK5WsGtuxaq+0mg2PFxBGsrg90=@dpdk.org X-Gm-Message-State: AOJu0YxqSWVHAJwFb3o5YjgIwgSQRFdSLcDMNxdfOv8Dn/2NYJ7KOwW+ J3DDCeBuyoaFWH/aGrjStgWdwawVl3I1v03bDoOmKJrPv5MwWEf0aRcC4+6rqitdG/exjvj26/W EOiZEJn1r5YBkAGByxOwC5UplkNECSlpuyeF7mmqhq540ZLUHB566vxzhR3xxnMHt29R3pJ/mBv ou6rx5tMnG X-Google-Smtp-Source: AGHT+IGBBEzihZXIZ+pa7Xzfb9tWU3CIyQAzQlxKXqtd8XQU7ovX1z37LavRz0eCsfpFIXLAV/ItZ707PcEF4+GmmpA= X-Received: by 2002:a17:90a:a78e:b0:2d8:a350:683a with SMTP id 98e67ed59e1d1-2db9ffb49e9mr27699925a91.19.1726755166924; Thu, 19 Sep 2024 07:12:46 -0700 (PDT) MIME-Version: 1.0 References: <20240911155058.11321-1-jspewock@iol.unh.edu> <20240916181445.13997-1-jspewock@iol.unh.edu> <80e007b5-f7a6-4316-ad90-b737ff0f009d@pantheon.tech> <892c0bba-26dc-4078-9dfd-ec3b5d1f6727@pantheon.tech> In-Reply-To: <892c0bba-26dc-4078-9dfd-ec3b5d1f6727@pantheon.tech> From: Jeremy Spewock Date: Thu, 19 Sep 2024 10:12:35 -0400 Message-ID: Subject: Re: [PATCH v2] dts: fix runner target in the Dockerfile To: =?UTF-8?Q?Juraj_Linke=C5=A1?= 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 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 Thu, Sep 19, 2024 at 3:09=E2=80=AFAM Juraj Linke=C5=A1 wrote: > > > > On 18. 9. 2024 16:16, Jeremy Spewock wrote: > > On Wed, Sep 18, 2024 at 3:57=E2=80=AFAM Juraj Linke=C5=A1 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 o= ption. > > > > 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=3D"$PATH:/root/.local/bin" > >>> +RUN poetry install --only main --no-root > >>> > >>> -CMD ["poetry", "run", "python", "main.py"] > >>> +ENTRYPOINT ["poetry", "run", "python", "main.py"] > >>> > --=20 *Let's Connect!* ...=C2=A0=C2=A0*October Webinars* Ask Us Anything: IOL Services=20 Open Q&A=20 Your=20 questions. Our answers. Let's get started. Oct 3rd Live Tour of INTACT=C2=AE=20 for IPv6 Testing and Validation=20 Open tour. Open Q&A. See why we think you'll love INTACT. Oct 9th How to=20 Prep for Our NVMe=C2=AE Plugfest #21=20 Checklists.=C2=A0Conversation.=C2=A0Let's get ready to plugin!=C2=A0 Oct 15th ...=C2=A0*=C2=A0 Newsletter* * * Get the IOL Connector=20 =C2=A0for our lastest news = and=20 event info. .