Skip to content

Add dockers to Fast and Basic Builds #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

Conversation

rbanka1
Copy link
Contributor

@rbanka1 rbanka1 commented May 6, 2025

Added UMF docker

// workflow executed on fork:
https://github.com/rbanka1/unified-memory-framework/actions/runs/15134054789
https://github.com/rbanka1/unified-memory-framework/actions/runs/15134054814

I added a new Docker image for Ubuntu 24.04 and updated the others.
I also created two new workflows that check for changes in the Docker files.
If any changes are detected, the relevant Docker image will be rebuilt and pushed (unless it's a pull request).
The rebuilt images will be available after the merge.

@KFilipek
Copy link
Contributor

KFilipek commented May 7, 2025

@lukaszstolarczuk
We have https://github.com/bb-umf account on GitHub.


# 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.

Scalable pool relies on TBB library (src/pool/pool_scalable.c), so this is an UMF dependency.

Copy link
Contributor

Choose a reason for hiding this comment

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

The same as for libnuma - as long as you don't use that pool it's not required. Hence, I'd leave as test deps.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay


# Dependencies for tests (optional)
ARG TEST_DEPS="\
libnuma-dev"
libnuma-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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay


env:
BUILD_DIR : "${{github.workspace}}/build"
INSTL_DIR : "${{github.workspace}}/install-dir"
INSTL_DIR : "${{github.workspace}}/../install-dir"
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe going outside the workspace is not the best idea.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@lukaszstolarczuk lukaszstolarczuk mentioned this pull request May 8, 2025
10 tasks
@rbanka1 rbanka1 force-pushed the newDocker branch 2 times, most recently from 6039c67 to b1d2ec2 Compare May 13, 2025 11:58
@@ -1,10 +1,10 @@
# Copyright (C) 2024 Intel Corporation
# Copyright (C) 2024-2025 Intel Corporation
Copy link
Contributor

Choose a reason for hiding this comment

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

pls order commits and add a proper commit title/message; while we're adding one new docker, the main change is something else 😉

pls also update the title of the PR, and if ready, please un-draft

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

Choose a reason for hiding this comment

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

we don't install hwloc from source on this image, libtool seems unneeded here...?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, it is required in Build UMF

Copy link
Contributor

Choose a reason for hiding this comment

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

hmm.. why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

och well, this build uses the old container, I suppose 😉nonetheless, libtool is not required if you have hwloc installed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems that libtool isnt needed but it is required in build umf so I left it

libtbb-dev"
# Hwloc installation dependencies
ARG HWLOC_DEPS="\
dos2unix \
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, removed


# 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
Copy link
Contributor

Choose a reason for hiding this comment

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

pls move this COPY step after all ARGs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay

libtool"

# Copy hwloc
# libhwloc-dev is required - installed via script because hwloc version is to old on this OS
Copy link
Contributor

Choose a reason for hiding this comment

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

is too old

Copy link
Contributor Author

Choose a reason for hiding this comment

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

misspelling :D

if: matrix.compiler.cxx == 'g++-7'
run: sudo apt-get install -y ${{matrix.compiler.cxx}}

- name: Get UMF version
Copy link
Contributor

Choose a reason for hiding this comment

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

why this step is removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

returned

@@ -192,7 +166,6 @@ jobs:
-DUMF_DISABLE_HWLOC=${{matrix.disable_hwloc}}
-DUMF_LINK_HWLOC_STATICALLY=${{matrix.link_hwloc_statically}}
${{ matrix.build_type == 'Debug' && matrix.compiler.c == 'gcc' && '-DUMF_USE_COVERAGE=ON' || '' }}
${{ matrix.llvm_linker || '' }}
Copy link
Contributor

Choose a reason for hiding this comment

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

why this is removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

returned

@@ -205,11 +178,14 @@ jobs:
${{ matrix.compiler.cxx == 'icpx' && '. /opt/intel/oneapi/setvars.sh' || true }}
LD_LIBRARY_PATH="${{env.BUILD_DIR}}/lib/:${LD_LIBRARY_PATH}" ctest --output-on-failure

- name: Set OS name
run: echo "OS_VER=ubuntu-${{ matrix.ubuntu_ver }}" >> $GITHUB_ENV
Copy link
Contributor

Choose a reason for hiding this comment

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

we set OS and OS_VER already within docker image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay

- name: Check coverage
if: ${{ matrix.build_type == 'Debug' && matrix.compiler.c == 'gcc' }}
working-directory: ${{env.BUILD_DIR}}
run: |
export COVERAGE_FILE_NAME=${{env.COVERAGE_NAME}}-${{matrix.os}}-shared-${{matrix.shared_library}}-no_hwloc-${{matrix.disable_hwloc}}
export COVERAGE_FILE_NAME=${{env.COVERAGE_NAME}}-${{env.OS_VER}}-shared-${{matrix.shared_library}}-no_hwloc-${{matrix.disable_hwloc}}
Copy link
Contributor

Choose a reason for hiding this comment

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

can't we still use matrix.os here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes but now I have 'ubuntu_ver' variable in matrix. If it is important I can change the name

Copy link
Contributor

Choose a reason for hiding this comment

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

either add ubuntu string here, or (preferably) bring back "os" var which contains full name of the os (as we will probably also add some fedora or other distros later on)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added full name

- name: Install oneAPI basekit
if: matrix.compiler.cxx == 'icpx'
run: |
sudo apt-get update
Copy link
Contributor

Choose a reason for hiding this comment

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

pls note sudo is probably not passwordless on the docker, so e.g. use syntax like here: https://github.com/pmem/pmemstream/blob/master/utils/docker/prepare-for-build.sh#L20

Copy link
Contributor Author

Choose a reason for hiding this comment

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

because I ran docker as root it is not necessary to use sudo, so removed it.

Copy link
Contributor

Choose a reason for hiding this comment

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

according to sec. rules, we should not use root as the default user, that's why I believe sudo should be used if needed for a specific step

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, now I ran docker as a test_user

@rbanka1 rbanka1 changed the title New docker UMF Add dockers to Fast and Basic Builds May 15, 2025
@rbanka1 rbanka1 force-pushed the newDocker branch 4 times, most recently from 11980b4 to 3552ecc Compare May 20, 2025 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants