DPDK CI discussions
 help / color / mirror / Atom feed
From: ohilyard@iol.unh.edu
To: ci@dpdk.org
Cc: aconole@redhat.com, Owen Hilyard <ohilyard@iol.unh.edu>
Subject: [PATCH 5/6] containers/container_builder: Container for python scripts
Date: Tue, 11 Oct 2022 12:52:54 -0400	[thread overview]
Message-ID: <20221011165255.506428-6-ohilyard@iol.unh.edu> (raw)
In-Reply-To: <20221011165255.506428-1-ohilyard@iol.unh.edu>

From: Owen Hilyard <ohilyard@iol.unh.edu>

Adds a container that can be used to run the python scripts to create
the Dockerfiles for the CI containers. This removes a large number of
python environment dependencies from the host requirements.

Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
---
 containers/container_builder.dockerfile | 26 +++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 containers/container_builder.dockerfile

diff --git a/containers/container_builder.dockerfile b/containers/container_builder.dockerfile
new file mode 100644
index 0000000..8a38e53
--- /dev/null
+++ b/containers/container_builder.dockerfile
@@ -0,0 +1,26 @@
+FROM ubuntu:22.04
+
+ENV DPDK_CI_CONTAINERS_COMPOSE_FILE_BUILDER=podman-compose
+ENV DPDK_CI_CONTAINER_BUILDER_PROGRAM=podman
+ENV DPDK_CI_CONTAINERS_PYTHON3_CMD=python3
+ENV DEBIAN_FRONTEND=noninteractive
+
+# If building on a RHEL host, 'yum repolist' will refresh the RHEL repos from the host this is being built on
+RUN apt-get update && apt-get install --no-install-recommends -y \
+    python3 python3-pip \
+    # Makefile deps 
+    make git
+RUN pip3 install poetry
+
+RUN git config --global --add safe.directory /container_workspace/container_context/dpdk
+RUN git config --global --add safe.directory /container_workspace/container_context/libabigail
+
+# Globally install required python libraries
+COPY template_engine/pyproject.toml /tmp/pyproject.toml
+COPY template_engine/poetry.lock /tmp/poetry.lock
+WORKDIR /tmp/
+RUN poetry config virtualenvs.create false
+RUN poetry install --no-interaction --no-ansi
+
+RUN mkdir /container_workspace
+WORKDIR /container_workspace
-- 
2.34.1


  parent reply	other threads:[~2022-10-11 16:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-11 16:52 [PATCH 0/6] Community Lab Container Definitions ohilyard
2022-10-11 16:52 ` [PATCH 1/6] containers/docs: Add container builder start ohilyard
2022-10-11 16:52 ` [PATCH 2/6] containers/inventory: Add inventory for container builder ohilyard
2022-10-11 20:24   ` Ali Alnubani
2022-10-11 16:52 ` [PATCH 3/6] containers/builder: Dockerfile creation script ohilyard
2022-10-11 16:52 ` [PATCH 4/6] containers/templates: Templates for Dockerfiles ohilyard
2022-10-11 20:24   ` Ali Alnubani
2022-10-11 16:52 ` ohilyard [this message]
2022-10-11 20:24   ` [PATCH 5/6] containers/container_builder: Container for python scripts Ali Alnubani
2022-10-11 16:52 ` [PATCH 6/6] containers/Makefile: Makefile to automate builds ohilyard

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=20221011165255.506428-6-ohilyard@iol.unh.edu \
    --to=ohilyard@iol.unh.edu \
    --cc=aconole@redhat.com \
    --cc=ci@dpdk.org \
    /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).