File tree Expand file tree Collapse file tree 3 files changed +166
-0
lines changed Expand file tree Collapse file tree 3 files changed +166
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Content
2
+
3
+ Dockerfiles and scripts placed in this directory are intended to be used as
4
+ development process vehicles and part of continuous integration process.
5
+
6
+ Images built out of those recipes may be used with Docker or podman as
7
+ development environment.
8
+
9
+ # How to build docker image
10
+
11
+ To build docker image on local machine enter the root dir of the repository and execute:
12
+
13
+ ``` sh
14
+ docker build -t ur:ubuntu-22.04 -f .github/docker/ubuntu-22.04.Dockerfile .
15
+ ```
16
+
17
+ To set any build time variable add it to the command (after ` build ` ). Example of using them are
18
+ proxy settings. They are required for accessing network (e.g., to download dependencies within docker),
19
+ if a host is using a proxy server, e.g.:
20
+
21
+ ``` sh
22
+ --build-arg https_proxy=http://proxy.com:port --build-arg http_proxy=http://proxy.com:port
23
+ ```
24
+
25
+ # How to use docker image
26
+
27
+ To run docker container (using the previously built image) execute:
28
+
29
+ ``` sh
30
+ docker run --shm-size=4G -v /your/workspace/path/:/opt/workspace:z -w /opt/workspace/ -it ur:ubuntu-22.04 /bin/bash
31
+ ```
32
+
33
+ To set (or override) any docker environment variable, add to the command (after ` run ` ):
34
+
35
+ ``` sh
36
+ -e ENV_VARIABLE=VALUE
37
+ ```
38
+
39
+ To start as a non-root user, add to the command (after ` run ` ):
40
+
41
+ ``` sh
42
+ --user user
43
+ ```
Original file line number Diff line number Diff line change
1
+ # Copyright (C) 2024 Intel Corporation
2
+ # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
3
+ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
+
5
+ #
6
+ # Dockerfile - a 'recipe' for Docker to build an image of ubuntu-based
7
+ # environment for building the Unified Memory Framework project.
8
+ #
9
+
10
+ # Pull base image ("20.04")
11
+ FROM registry.hub.docker.com/library/ubuntu@sha256:f2034e7195f61334e6caff6ecf2e965f92d11e888309065da85ff50c617732b8
12
+
13
+ # Set environment variables
14
+ ENV OS ubuntu
15
+ ENV OS_VER 20.04
16
+ ENV NOTTY 1
17
+ ENV DEBIAN_FRONTEND noninteractive
18
+
19
+ # Base development packages
20
+ ARG BASE_DEPS="\
21
+ build-essential \
22
+ cmake"
23
+
24
+ # UMF's dependencies
25
+ ARG UMF_DEPS="\
26
+ libjemalloc-dev \
27
+ libhwloc-dev \
28
+ libtbb-dev"
29
+
30
+ # Dependencies for tests (optional)
31
+ ARG TEST_DEPS="\
32
+ libnuma-dev"
33
+
34
+ # Miscellaneous for our builds/CI (optional)
35
+ ARG MISC_DEPS="\
36
+ clang \
37
+ g++-7 \
38
+ python3-pip \
39
+ sudo \
40
+ whois"
41
+
42
+ # Update and install required packages
43
+ RUN apt-get update \
44
+ && apt-get install -y --no-install-recommends \
45
+ ${BASE_DEPS} \
46
+ ${UMF_DEPS} \
47
+ ${TEST_DEPS} \
48
+ ${MISC_DEPS} \
49
+ && rm -rf /var/lib/apt/lists/* \
50
+ && apt-get clean all
51
+
52
+ # Prepare a dir (accessible by anyone)
53
+ RUN mkdir --mode 777 /opt/umf/
54
+
55
+ # Additional dependencies (installed via pip)
56
+ COPY third_party/requirements.txt /opt/umf/requirements.txt
57
+ RUN pip3 install --no-cache-dir -r /opt/umf/requirements.txt
58
+
59
+ # Add a new (non-root) 'user'
60
+ ENV USER user
61
+ ENV USERPASS pass
62
+ RUN useradd -m "${USER}" -g sudo -p "$(mkpasswd ${USERPASS})"
Original file line number Diff line number Diff line change
1
+ # Copyright (C) 2024 Intel Corporation
2
+ # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
3
+ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
+
5
+ #
6
+ # Dockerfile - a 'recipe' for Docker to build an image of ubuntu-based
7
+ # environment for building the Unified Memory Framework project.
8
+ #
9
+
10
+ # Pull base image ("22.04")
11
+ FROM registry.hub.docker.com/library/ubuntu@sha256:e6173d4dc55e76b87c4af8db8821b1feae4146dd47341e4d431118c7dd060a74
12
+
13
+ # Set environment variables
14
+ ENV OS ubuntu
15
+ ENV OS_VER 22.04
16
+ ENV NOTTY 1
17
+ ENV DEBIAN_FRONTEND noninteractive
18
+
19
+ # Base development packages
20
+ ARG BASE_DEPS="\
21
+ build-essential \
22
+ cmake"
23
+
24
+ # UMF's dependencies
25
+ ARG UMF_DEPS="\
26
+ libjemalloc-dev \
27
+ libhwloc-dev \
28
+ libtbb-dev"
29
+
30
+ # Dependencies for tests (optional)
31
+ ARG TEST_DEPS="\
32
+ libnuma-dev"
33
+
34
+ # Miscellaneous for our builds/CI (optional)
35
+ ARG MISC_DEPS="\
36
+ clang \
37
+ python3-pip \
38
+ sudo \
39
+ whois"
40
+
41
+ # Update and install required packages
42
+ RUN apt-get update \
43
+ && apt-get install -y --no-install-recommends \
44
+ ${BASE_DEPS} \
45
+ ${UMF_DEPS} \
46
+ ${TEST_DEPS} \
47
+ ${MISC_DEPS} \
48
+ && rm -rf /var/lib/apt/lists/* \
49
+ && apt-get clean all
50
+
51
+ # Prepare a dir (accessible by anyone)
52
+ RUN mkdir --mode 777 /opt/umf/
53
+
54
+ # Additional dependencies (installed via pip)
55
+ COPY third_party/requirements.txt /opt/umf/requirements.txt
56
+ RUN pip3 install --no-cache-dir -r /opt/umf/requirements.txt
57
+
58
+ # Add a new (non-root) 'user'
59
+ ENV USER user
60
+ ENV USERPASS pass
61
+ RUN useradd -m "${USER}" -g sudo -p "$(mkpasswd ${USERPASS})"
You can’t perform that action at this time.
0 commit comments