Skip to content

New docker UMF #1298

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 19 additions & 10 deletions .github/docker/ubuntu-20.04.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Copyright (C) 2024 Intel Corporation
# Copyright (C) 2024-2025 Intel Corporation
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#
# Dockerfile - a 'recipe' for Docker to build an image of ubuntu-based
# environment for building the Unified Memory Framework project.
# environment for building the Unified Memory Framework project.
#

# Pull base image ("20.04")
Expand All @@ -22,20 +22,27 @@ ARG BASE_DEPS="\
cmake \
git"

# UMF's dependencies
ARG UMF_DEPS="\
libhwloc-dev \
libtbb-dev"
# Hwloc installation dependencies
ARG HWLOC_DEPS="\
dos2unix \
libtool"

# Copy hwloc
# libhwloc-dev is required - installed via script because hwloc version is to old on this OS
COPY .github/scripts/install_hwloc.sh /opt/umf/install_hwloc.sh

# Dependencies for tests (optional)
ARG TEST_DEPS="\
libnuma-dev"
libnuma-dev \
libtbb-dev \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's requirement for OS memory provider, according to README.md

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in the readme, it's for testing :)

While I agree with you that for runtime this is a requirement, it is not the hard requirement. As long as you don't use that provider it's not really required, hence we only mark this as "for testing" (or, in the user's case - for the application that uses the provider).

I'd personally leave libnuma as test deps.

valgrind"

# Miscellaneous for our builds/CI (optional)
ARG MISC_DEPS="\
automake \
clang \
g++-7 \
lcov \
python3-pip \
sudo \
whois"
Expand All @@ -44,18 +51,20 @@ ARG MISC_DEPS="\
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
${BASE_DEPS} \
${UMF_DEPS} \
${TEST_DEPS} \
${MISC_DEPS} \
${HWLOC_DEPS} \
&& /opt/umf/install_hwloc.sh \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean all

# Prepare a dir (accessible by anyone)
RUN mkdir --mode 777 /opt/umf/
RUN mkdir -p --mode 777 /opt/umf/

# Additional dependencies (installed via pip)
# It's actively used and tested only on selected distros. Be aware
# they may not work, because pip packages list differ from OS to OS.
COPY third_party/requirements.txt /opt/umf/requirements.txt
RUN pip3 install --no-cache-dir -r /opt/umf/requirements.txt

# Add a new (non-root) 'test_user'
ENV USER test_user
Expand Down
17 changes: 10 additions & 7 deletions .github/docker/ubuntu-22.04.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2024 Intel Corporation
# Copyright (C) 2024-2025 Intel Corporation
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

Expand All @@ -20,21 +20,24 @@ ENV DEBIAN_FRONTEND noninteractive
ARG BASE_DEPS="\
build-essential \
cmake \
git"
git \
libtool"

# UMF's dependencies
ARG UMF_DEPS="\
libhwloc-dev \
libtbb-dev"
libhwloc-dev"

# Dependencies for tests (optional)
ARG TEST_DEPS="\
libnuma-dev"
libnuma-dev \
libtbb-dev \
valgrind"

# Miscellaneous for our builds/CI (optional)
ARG MISC_DEPS="\
automake \
clang \
lcov \
python3-pip \
sudo \
whois"
Expand All @@ -43,14 +46,14 @@ ARG MISC_DEPS="\
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
${BASE_DEPS} \
${UMF_DEPS} \
${TEST_DEPS} \
${MISC_DEPS} \
${UMF_DEPS} \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean all

# Prepare a dir (accessible by anyone)
RUN mkdir --mode 777 /opt/umf/
RUN mkdir -p --mode 777 /opt/umf/

# Additional dependencies (installed via pip)
COPY third_party/requirements.txt /opt/umf/requirements.txt
Expand Down
66 changes: 66 additions & 0 deletions .github/docker/ubuntu-24.04.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Copyright (C) 2025 Intel Corporation
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#
# Dockerfile - a 'recipe' for Docker to build an image of ubuntu-based
# environment for building the Unified Memory Framework project.
#

# Pull base image ("24.04")
FROM registry.hub.docker.com/library/ubuntu@sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782

# Set environment variables
ENV OS ubuntu
ENV OS_VER 24.04
ENV NOTTY 1
ENV DEBIAN_FRONTEND noninteractive

# Base development packages
ARG BASE_DEPS="\
build-essential \
cmake \
git \
gnupg"

# UMF's dependencies
ARG UMF_DEPS="\
libhwloc-dev"

# Dependencies for tests (optional)
ARG TEST_DEPS="\
libnuma-dev \
libtbb-dev \
valgrind"

# Miscellaneous for our builds/CI (optional)
ARG MISC_DEPS="\
automake \
clang \
lcov \
python3-pip \
sudo \
whois"

# Update and install required packages
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
${BASE_DEPS} \
${TEST_DEPS} \
${MISC_DEPS} \
${UMF_DEPS} \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean all

# Prepare a dir (accessible by anyone)
RUN mkdir -p --mode 777 /opt/umf/

# Additional dependencies (installed via pip)
COPY third_party/requirements.txt /opt/umf/requirements.txt
RUN pip3 install --no-cache-dir --break-system-packages -r /opt/umf/requirements.txt

# Add a new (non-root) 'test_user'
ENV USER test_user
ENV USERPASS pass
RUN useradd -m "${USER}" -g sudo -p "$(mkpasswd ${USERPASS})"
USER test_user
42 changes: 42 additions & 0 deletions .github/workflows/detect_changes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: DetectChanges

on:
pull_request:
paths:
- '.github/docker/*.Dockerfile'
push:
paths:
- '.github/docker/*.Dockerfile'

permissions:
contents: read

jobs:
DetectChanges:
runs-on: ubuntu-latest
outputs:
changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c #v46.0.5

- name: List all changed files
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
echo "Changed files: $ALL_CHANGED_FILES"

RunReusableDocker:
needs: DetectChanges
if: ${{ contains(join(needs.DetectChanges.outputs.changed_files, ' '), '.github/docker/') }}
uses: ./.github/workflows/reusable_dockers_build.yml
permissions:
contents: read
packages: write
secrets: inherit
6 changes: 4 additions & 2 deletions .github/workflows/pr_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ concurrency:

permissions:
contents: read
packages: read

jobs:
CodeChecks:
uses: ./.github/workflows/reusable_checks.yml
DocsBuild:
uses: ./.github/workflows/reusable_docs_build.yml
FastBuild:
name: Fast builds
needs: [CodeChecks]
needs: [CodeChecks, DocsBuild]
uses: ./.github/workflows/reusable_fast.yml
Build:
name: Basic builds
Expand Down
Loading
Loading