1- # Copyright (C) 2024 Intel Corporation
1+ # Copyright (C) 2024-2025 Intel Corporation
22# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
33# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44
55#
66# Dockerfile - a 'recipe' for Docker to build an image of ubuntu-based
7- # environment for building the Unified Memory Framework project.
7+ # environment for building the Unified Memory Framework project.
88#
99
1010# Pull base image ("20.04")
@@ -22,43 +22,50 @@ ARG BASE_DEPS="\
2222 cmake \
2323 git"
2424
25- # UMF's dependencies
26- ARG UMF_DEPS="\
27- libhwloc-dev \
28- libtbb-dev"
25+ # Hwloc installation dependencies
26+ ARG HWLOC_DEPS="\
27+ libtool"
2928
3029# Dependencies for tests (optional)
3130ARG TEST_DEPS="\
32- libnuma-dev"
31+ libnuma-dev \
32+ libtbb-dev \
33+ valgrind"
3334
3435# Miscellaneous for our builds/CI (optional)
3536ARG MISC_DEPS="\
3637 automake \
3738 clang \
3839 g++-7 \
40+ lcov \
3941 python3-pip \
4042 sudo \
4143 whois"
4244
45+ # libhwloc-dev is required - installed via script because hwloc version is too old on this OS
46+ COPY .github/scripts/install_hwloc.sh /opt/umf/install_hwloc.sh
47+
4348# Update and install required packages
4449RUN apt-get update \
4550 && apt-get install -y --no-install-recommends \
4651 ${BASE_DEPS} \
47- ${UMF_DEPS} \
4852 ${TEST_DEPS} \
4953 ${MISC_DEPS} \
54+ ${HWLOC_DEPS} \
55+ && /opt/umf/install_hwloc.sh \
5056 && rm -rf /var/lib/apt/lists/* \
5157 && apt-get clean all
5258
5359# Prepare a dir (accessible by anyone)
54- RUN mkdir --mode 777 /opt/umf/
60+ RUN mkdir -p - -mode 777 /opt/umf/
5561
5662# Additional dependencies (installed via pip)
63+ # It's actively used and tested only on selected distros. Be aware
64+ # they may not work, because pip packages list differ from OS to OS.
5765COPY third_party/requirements.txt /opt/umf/requirements.txt
58- RUN pip3 install --no-cache-dir -r /opt/umf/requirements.txt
5966
6067# Add a new (non-root) 'test_user'
6168ENV USER test_user
6269ENV USERPASS pass
63- RUN useradd -m "${USER}" -g sudo -p "$(mkpasswd ${USERPASS})"
70+ RUN useradd -m -u 1001 "${USER}" -g sudo -p "$(mkpasswd ${USERPASS})"
6471USER test_user
0 commit comments