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 B672D459AD; Mon, 16 Sep 2024 12:16:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 47E6D40C35; Mon, 16 Sep 2024 12:16:25 +0200 (CEST) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by mails.dpdk.org (Postfix) with ESMTP id C139D40041 for ; Mon, 16 Sep 2024 12:16:23 +0200 (CEST) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-42cae4eb026so41973755e9.0 for ; Mon, 16 Sep 2024 03:16:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1726481783; x=1727086583; 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=XSwkEXtZwys6kogoVhp7Rk21RhzAMe8ionD/b0R1ji4=; b=NI7DovrtMa/kWAUOLs/FeMiJBpl9UDdo4Ltl6WKQ8h7+IARyOoRP/FoHoXxC32Npek qSxN622fBajphv3FLJqehrFzrVsLAlgkqhHFv72joq4fX4bzEGVh4wzFMWOwEUHlxtAD hf5Kb2epFtDBTMI1dceDM89+DEZTEFCKd89hEHeNg+GiiXsh2rw4i4fQPCGAYAnFzPHo 4eKs+D08b/QTBNoZWXGSzA+s5llrwBAFH+JQK62GA+xES6t6s43ybParKtNVTpddgOML KBuJLDp3fqGvgTkoctOMvjSf2qGBviOYMGx3xhr5q42iQb4gnhsPMLMhG54OOu82PulF qsRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726481783; x=1727086583; 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=XSwkEXtZwys6kogoVhp7Rk21RhzAMe8ionD/b0R1ji4=; b=jn6dbXo+A/h+JyJrRDkmTlxAadmuM5j5P3Ed6IpNbZDMj6vtuaa0GhUO8EyQZ3dvD0 FflDu0li6B4ndxjTEqYuJwmjrinqF3zrBs2y1vNwWXz2h4C3+elYi1v4WJl1Vpt70wZE bnK70rjy9LegZz+sCxyXMgLJd9UTyx9a5oqglb7vzrEBvU8+iba/zLjcpVCm5BSzodcT DCSpjC39sJnCPP3tzJkx/UJTw5kq6LeBf8NEltCkJ9xd992xLfY1ctN60tGnaFnHuA6b 0nHZvWzhLcRaOqyKdIpGho69E59VuyEsHn2B3eDeLuor86ePSTyREf5Tg1QpgovqWURh haLw== X-Gm-Message-State: AOJu0YyHY2cdB7it1KczwwZy6RsK5c6adVJslsr0F71R5gcQz4tlW0d6 pU1PWOtpEO6cMx3DUBelfuJS1xmtYaHrJ7QS/byFD29y7eSKdSBUQUJBHiRGHdM= X-Google-Smtp-Source: AGHT+IGAtL2Gp1TaEKMPXMbg5fN0tE8Oq81ttVxM3VL1OsprVJC8vujMLMXd6D9pNiyTK7Y3ry89Ww== X-Received: by 2002:a05:600c:4d06:b0:42c:acb0:ddb6 with SMTP id 5b1f17b1804b1-42cdb531b66mr109760625e9.9.1726481783105; Mon, 16 Sep 2024 03:16:23 -0700 (PDT) Received: from [192.168.200.22] ([84.245.121.62]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42d9b15d5bcsm106927885e9.26.2024.09.16.03.16.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Sep 2024 03:16:22 -0700 (PDT) Message-ID: Date: Mon, 16 Sep 2024 12:16:21 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1] dts: fix runner target in the Dockerfile 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 References: <20240911155058.11321-1-jspewock@iol.unh.edu> Content-Language: en-US From: =?UTF-8?Q?Juraj_Linke=C5=A1?= In-Reply-To: <20240911155058.11321-1-jspewock@iol.unh.edu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 11. 9. 2024 17:50, jspewock@iol.unh.edu wrote: > From: Jeremy Spewock > > 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 > --- > 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"] >