Debian Codegraph @

.github/workflows/performance/Dockerfile

raw
1 # ==============================================================================
2 # Copyright (C) Intel Corporation
3 #
4 # SPDX-License-Identifier: MIT
5 # ==============================================================================
6 ARG BASE_IMAGE
7 FROM ${BASE_IMAGE}
8
9 USER root
10 WORKDIR /setup
11 COPY MSPerf.py /opt/intel/samples/bin/performance/MSPerf.py
12 COPY performance.sh performance.sh
13
14 ARG GROUP_ID
15 ARG USER_ID
16
17 RUN if [ -z "$GROUP_ID" ]; then echo \
18 "GROUP_ID is not set for container. Use --build-arg GROUP_ID=$(id -g)"; \
19 exit 1; fi
20 RUN if [ -z "$USER_ID" ]; then echo \
21 "USER_ID is not set for container. Use --build-arg USER_ID=$(id -u)"; \
22 exit 1; fi
23
24 # Use non-root user
25 RUN groupadd --system --gid ${GROUP_ID} appgroup \
26 && useradd --system --create-home --uid ${USER_ID} --gid ${GROUP_ID} appuser
27 USER appuser
28
29 HEALTHCHECK CMD python3 --version || exit 1