1
- # Copyright (C) 2024 Intel Corporation
1
+ # Copyright (C) 2024-2025 Intel Corporation
2
2
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
3
3
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
4
5
5
#
6
6
# 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.
8
8
#
9
9
10
10
# Pull base image ("20.04")
@@ -22,43 +22,50 @@ ARG BASE_DEPS="\
22
22
cmake \
23
23
git"
24
24
25
- # UMF's dependencies
26
- ARG UMF_DEPS="\
27
- libhwloc-dev \
28
- libtbb-dev"
25
+ # Hwloc installation dependencies
26
+ ARG HWLOC_DEPS="\
27
+ libtool"
29
28
30
29
# Dependencies for tests (optional)
31
30
ARG TEST_DEPS="\
32
- libnuma-dev"
31
+ libnuma-dev \
32
+ libtbb-dev \
33
+ valgrind"
33
34
34
35
# Miscellaneous for our builds/CI (optional)
35
36
ARG MISC_DEPS="\
36
37
automake \
37
38
clang \
38
39
g++-7 \
40
+ lcov \
39
41
python3-pip \
40
42
sudo \
41
43
whois"
42
44
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
+
43
48
# Update and install required packages
44
49
RUN apt-get update \
45
50
&& apt-get install -y --no-install-recommends \
46
51
${BASE_DEPS} \
47
- ${UMF_DEPS} \
48
52
${TEST_DEPS} \
49
53
${MISC_DEPS} \
54
+ ${HWLOC_DEPS} \
55
+ && /opt/umf/install_hwloc.sh \
50
56
&& rm -rf /var/lib/apt/lists/* \
51
57
&& apt-get clean all
52
58
53
59
# Prepare a dir (accessible by anyone)
54
- RUN mkdir --mode 777 /opt/umf/
60
+ RUN mkdir -p - -mode 777 /opt/umf/
55
61
56
62
# 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.
57
65
COPY third_party/requirements.txt /opt/umf/requirements.txt
58
- RUN pip3 install --no-cache-dir -r /opt/umf/requirements.txt
59
66
60
67
# Add a new (non-root) 'test_user'
61
68
ENV USER test_user
62
69
ENV USERPASS pass
63
- RUN useradd -m "${USER}" -g sudo -p "$(mkpasswd ${USERPASS})"
70
+ RUN useradd -m -u 1001 "${USER}" -g sudo -p "$(mkpasswd ${USERPASS})"
64
71
USER test_user
0 commit comments