-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathfedora
30 lines (25 loc) · 1.36 KB
/
fedora
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
ARG TAG=latest
FROM registry.fedoraproject.org/fedora:${TAG}
ARG INTEL
RUN ( dnf -y update || dnf -y update ) && \
dnf -y install \
make cmake git gcc-c++ gcc-gfortran ccache vim-minimal clang llvm compiler-rt sudo clang-tools-extra ninja-build libomp-devel wget zstd hwloc-devel flang hpx-devel && \
dnf clean all
RUN source /etc/os-release && if [ "${VERSION_ID}" -lt 40 ]; then \
( dnf -y update || dnf -y update ) && \
dnf -y install flang-devel && \
dnf clean all; \
fi
RUN if [ "${INTEL}" = "yes" ]; then \
printf "[oneAPI]\nname=Intel oneAPI\nbaseurl=https://yum.repos.intel.com/oneapi\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB" > /etc/yum.repos.d/intel-oneapi.repo && \
dnf -y update && \
dnf -y install intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic && \
dnf clean all; \
fi
RUN useradd -m -G wheel -u 1001 kokkos
RUN echo '%wheel ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER kokkos
ENV PATH=${INTEL:+/opt/intel/oneapi/compiler/latest/linux/bin:/opt/intel/oneapi/compiler/latest/linux/bin/intel64}${PATH:+:}${PATH}
ENV LD_LIBRARY_PATH=${INTEL:+/opt/intel/oneapi/compiler/latest/linux/compiler/lib/intel64:/opt/intel/oneapi/mkl/latest/lib/intel64}${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}
ENV CCACHE_MAXSIZE=250M
WORKDIR /home/kokkos