-
Notifications
You must be signed in to change notification settings - Fork 35
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
base: main
Are you sure you want to change the base?
Changes from all commits
b668842
c2d35fc
ef8733e
fd055d3
5bc7506
4b44fe4
b442229
e14f45e
ae65dbf
b1d2ec2
e6900b6
8bf1b25
19c9daa
8c7e08c
511b6af
253b428
156d4ed
69cf743
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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") | ||
|
@@ -22,40 +22,47 @@ ARG BASE_DEPS="\ | |
cmake \ | ||
git" | ||
|
||
# UMF's dependencies | ||
ARG UMF_DEPS="\ | ||
libhwloc-dev \ | ||
libtbb-dev" | ||
# Hwloc installation dependencies | ||
ARG HWLOC_DEPS="\ | ||
libtool" | ||
|
||
# Dependencies for tests (optional) | ||
ARG TEST_DEPS="\ | ||
libnuma-dev" | ||
libnuma-dev \ | ||
libtbb-dev \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's requirement for OS memory provider, according to There was a problem hiding this comment. Choose a reason for hiding this commentThe 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" | ||
|
||
# libhwloc-dev is required - installed via script because hwloc version is too old on this OS | ||
COPY .github/scripts/install_hwloc.sh /opt/umf/install_hwloc.sh | ||
|
||
# Update and install required packages | ||
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 | ||
|
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" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we need |
||
|
||
# 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 |
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 |
There was a problem hiding this comment.
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