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 432A4459D1; Thu, 19 Sep 2024 09:09:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D904D406B8; Thu, 19 Sep 2024 09:09:15 +0200 (CEST) Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) by mails.dpdk.org (Postfix) with ESMTP id A3AE54068A for ; Thu, 19 Sep 2024 09:09:12 +0200 (CEST) Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-a8d51a7d6f5so55469566b.2 for ; Thu, 19 Sep 2024 00:09:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1726729752; x=1727334552; darn=dpdk.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=6GK1Jt1fKj7jWp/qmevGH9XXc2A2E+mxa3OyE19ot2U=; b=pDfbztla4E4gpc24jblAhC4fUx14mNLPnFvQm9UQ6ZGyXFP5Rg81YswdwAZVUR9Ytp 1E4aLo2W4afjXE8i984DWP7cwGsrROUkO28Gd+mgatwDZ77qex+10qhHntI8XHnEEZE9 jcL5TXG2CnqUO9jC23JW5vL5XbtWdcIn+G5VKxN0OVkJHdR1G4YHKAie/ZvVjwcSs5EO Kge1+MMMI0Hc3Ex/iwKjotj9MQ1SJGG3AcQRnT79Y6VjoCaylBtu7cNSGTOZh2OcIG8w jYmNqFIpq9piOXjeO9j8yDeMQ+lfsgaFRlDpzHufjJ6rFTihtxXdxsNG/5jsLR+k/A6d 7tQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726729752; x=1727334552; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6GK1Jt1fKj7jWp/qmevGH9XXc2A2E+mxa3OyE19ot2U=; b=hLzDSzSGhj3T7zRbrPamNtRBu9AOL6MajcljruDf1OFv9M0JjNVeJgunkufhifjXRv MgpnOGfD+tBanynbtuAGM1iAnA2dDWfXUWvEugTNPK5/KT7qvOZWeYsSNpBiOGQs5ORv lZyD6c6Phm6snCoixHTq9tSyO9XvlORIycb/nX5cukGGgreaUmyZKSlZjVoCbJyAIAnq sx9DOHoNPuY6suvs1PeGK+QegkhNAk5yIhSW/sQ/W8wyp4GOOhtOlwRMS4i/V2ggw4EQ 0RsyM2UH9ULpaGnvmcTCRLI0K/uoJLs4QftnGlcough4zWdgspF2WIMZR9U/MK4NJ1D4 2XcQ== X-Forwarded-Encrypted: i=1; AJvYcCUROxqVeV4HMNfwmm+34kj/4m0qKBgVLqWozxV2FDtmDRKzeM+KAwezjS6BLsXbh1O/+RM=@dpdk.org X-Gm-Message-State: AOJu0Yyl4J6C+sOWIe9iq2K6GlgEbqtxi3pTqfzEkmhn+85Z+pZ2cFjd dJjkTQ5gp33EoptrQZtxaHxRZGJ54aDcWYPQeU+khZW/Rl8khgT4kXDovZWFC3w= X-Google-Smtp-Source: AGHT+IFxyEwK5lW6Np3wxFI7+Ob0ieNEdNMpoX+M/sd+9IIeM/+f4sn9z4/z/ynGvNGSYcSj7kpyLQ== X-Received: by 2002:a17:906:c107:b0:a86:700f:93c1 with SMTP id a640c23a62f3a-a902966f571mr2697010266b.60.1726729752357; Thu, 19 Sep 2024 00:09:12 -0700 (PDT) Received: from [192.168.200.22] ([84.245.121.62]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a90612df750sm678306266b.160.2024.09.19.00.09.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Sep 2024 00:09:12 -0700 (PDT) Message-ID: <892c0bba-26dc-4078-9dfd-ec3b5d1f6727@pantheon.tech> Date: Thu, 19 Sep 2024 09:09:10 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] dts: fix runner target in the Dockerfile To: Jeremy Spewock 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 References: <20240911155058.11321-1-jspewock@iol.unh.edu> <20240916181445.13997-1-jspewock@iol.unh.edu> <80e007b5-f7a6-4316-ad90-b737ff0f009d@pantheon.tech> Content-Language: en-US From: =?UTF-8?Q?Juraj_Linke=C5=A1?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 18. 9. 2024 16:16, Jeremy Spewock wrote: > On Wed, Sep 18, 2024 at 3:57 AM Juraj Linkeš 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"] >>>