-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.OpenCL.IntelGPU
More file actions
113 lines (94 loc) · 4.27 KB
/
Dockerfile.OpenCL.IntelGPU
File metadata and controls
113 lines (94 loc) · 4.27 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
FROM ubuntu:20.04 AS builder
WORKDIR /project
RUN apt-get -qq update && \
DEBIAN_FRONTEND=noninteractive \
apt-get -qq install -y cmake git vim gcc g++ gfortran wget gnupg && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Installing latest GCC compiler (version 8) for latest compatible with CUDA
RUN apt-get -qq update && \
apt-get -qq install -y gcc-8 g++-8 gfortran-8 \
gcc-10 g++-10 gfortran-10 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# We can use the update-alternatives to switch between compiler versions
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 70\
--slave /usr/bin/g++ g++ /usr/bin/g++-8\
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-8\
--slave /usr/bin/gcov gcov /usr/bin/gcov-8
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 80\
--slave /usr/bin/g++ g++ /usr/bin/g++-9\
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-9\
--slave /usr/bin/gcov gcov /usr/bin/gcov-9
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 90\
--slave /usr/bin/g++ g++ /usr/bin/g++-10\
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-10\
--slave /usr/bin/gcov gcov /usr/bin/gcov-10
RUN chmod u+s /usr/bin/update-alternatives
## Intel graphics software for computation
RUN wget -q https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
RUN apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
RUN rm -f GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
RUN echo "deb https://apt.repos.intel.com/oneapi all main" >> /etc/apt/sources.list.d/oneAPI.list
RUN echo "deb [trusted=yes arch=amd64] https://repositories.intel.com/graphics/ubuntu bionic main" >> /etc/apt/sources.list.d/intel-graphics.list
#RUN add-apt-repository ppa:intel-opencl/intel-opencl
RUN apt-get -qq update && \
apt-get -qq install -y \
intel-opencl-icd && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN apt-get -qq update && \
apt-get -qq install -y \
clinfo && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN clinfo
# intel-basekit-getting-started \
# intel-oneapi-advisor \
# intel-oneapi-ccl \
# intel-oneapi-common-licensing \
# intel-oneapi-common-vars \
# intel-oneapi-dev-utilities \
# intel-oneapi-dpcpp-compiler \
# intel-oneapi-dpcpp-ct \
# intel-oneapi-dpcpp-debugger \
# intel-oneapi-ipp \
# intel-oneapi-ipp-devel \
# intel-oneapi-libdpstd-devel \
# intel-oneapi-mkl \
# intel-oneapi-mkl-devel \
# intel-oneapi-openmp \
# intel-oneapi-tbb \
# intel-oneapi-tbb-devel \
# intel-oneapi-vtune \
# intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic \
# intel-oneapi-icc-eclipse-cfg \
# intel-hpckit-getting-started \
# intel-oneapi-ifort \
# intel-oneapi-inspector \
# intel-oneapi-itac \
# intel-opencl && \
# apt-get clean && \
# rm -rf /var/lib/apt/lists/*
#
## Generic OpenCL Loader
#RUN apt-get -qq update && \
# apt-get -qq install -y clinfo ocl-icd-libopencl1 ocl-icd-* opencl-headers && \
# apt-get clean && \
# rm -rf /var/lib/apt/lists/*
#RUN nvidia-smi
SHELL ["/bin/bash", "-c"]
RUN groupadd chapter12 && useradd -m -s /bin/bash -g chapter12 chapter12
RUN usermod -a -G video chapter12
WORKDIR /home/chapter12
RUN chown -R chapter12:chapter12 /home/chapter12
USER chapter12
#ENV Kokkos_DIR=/Project/Kokkos/lib/cmake/Kokkos
#ENV Raja_DIR=/Project/Raja/share/raja/cmake
#ENV PATH=${PATH}:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin/x86_64
#ENV PATH=${PATH}:/opt/intel/inteloneapi/compiler/2021.1-beta04/linux/bin
#ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/intel/inteloneapi/compiler/2021.1-beta04/linux/compiler/lib/intel64_lin:/opt/intel/inteloneapi/compiler/2021.1-beta04/linux/lib
RUN git clone --recursive https://github.com/essentialsofparallelcomputing/Chapter12.git
WORKDIR /home/chapter12/Chapter12
#RUN make
ENTRYPOINT ["bash"]