Debian Codegraph @

docker/fedora/Dockerfile

raw
1 #
2 # Copyright (c) 2017-2025, Intel Corporation
3 #
4 # SPDX-License-Identifier: BSD-3-Clause
5
6 FROM fedora:39
7 LABEL maintainer="Nurmukhametov, Aleksei <[email protected]>"
8 SHELL ["/bin/bash", "-c"]
9
10 ARG REPO=ispc/ispc
11 ARG SHA=main
12
13 # If you are behind a proxy, you need to configure dnf to use it.
14 RUN if [ -v http_proxy ]; then echo "proxy=$http_proxy" >> /etc/dnf/dnf.conf; fi
15
16 # Packages required to build ISPC.
17 RUN dnf install -y git cmake python3-setuptools python3-devel && \
18 dnf install -y clang-devel llvm-devel glibc-devel.i686 && \
19 dnf install -y flex bison tbb-devel && \
20 dnf clean -y all
21
22 # If you are behind a proxy, you need to configure git to use it.
23 RUN if [ -v http_proxy ]; then git config --global --add http.proxy "$http_proxy"; fi
24
25 # LLVM
26 # We don't build llvm here because we use system shared libraries.
27
28 WORKDIR /usr/local/src
29
30 # Create new non-root user and switch to it
31 RUN useradd -m -d /home/ispc_user -s /bin/bash -U ispc_user && \
32 chown -R ispc_user:ispc_user /usr
33
34 USER ispc_user
35
36 # Clone, configure and build ISPC
37 # Some check-all tests may fail because we use system LLVM here
38 RUN git clone --depth=1 https://github.com/$REPO.git ispc && \
39 git -C ispc checkout $SHA && \
40 cmake ispc -B build-ispc -DCMAKE_INSTALL_PREFIX=/usr && \
41 cmake --build build-ispc -v -j "$(nproc)" && \
42 (cmake --build build-ispc --target check-all || true) && \
43 (echo "shared libs deps of ispc" && ldd ./build-ispc/bin/ispc) && \
44 cmake --install build-ispc && \
45 rm -rf build ispc