# Contributed by Calvin Madsen

FROM ubuntu:jammy

RUN apt-get update -qq && \
    apt install -y git make cmake gcc g++ gawk
RUN apt-get install -y python3 python3-h5py
RUN apt-get install -y wget
RUN apt-get install -y vim

# intel compilers (icc, icx, icpc, icpx, ifort, ifx)
RUN wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/89283df8-c667-47b0-b7e1-c4573e37bd3e/l_dpcpp-cpp-compiler_p_2023.1.0.46347.sh
RUN sh ./l_dpcpp-cpp-compiler_p_2023.1.0.46347.sh -a --silent --eula accept
RUN wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/150e0430-63df-48a0-8469-ecebff0a1858/l_fortran-compiler_p_2023.1.0.46348.sh
RUN sh ./l_fortran-compiler_p_2023.1.0.46348.sh -a --silent --eula accept

# set paths
ENV PATH="/opt/intel/oneapi/compiler/latest/linux/bin/intel64:/opt/intel/oneapi/compiler/latest/linux/bin:${PATH}"
ENV LD_LIBRARY_PATH="/opt/intel/oneapi/compiler/latest/linux/compiler/lib/intel64_lin"

# clean up
RUN rm -f ./l_dpcpp-cpp-compiler_p_2023.1.0.46347.sh
RUN rm -f ./l_fortran-compiler_p_2023.1.0.46348.sh
