Skip to content

Commit a489e5c

Browse files
committed
Cleaning up containers
1 parent 2e45e2c commit a489e5c

File tree

8 files changed

+147
-390
lines changed

8 files changed

+147
-390
lines changed

Dockerfile

Lines changed: 0 additions & 1 deletion
This file was deleted.

Dockerfile

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# Part of the examples from the Parallel and High Performance Computing
2+
# Robey and Zamora, Manning Publications
3+
# https://github.com/EssentialsofParallelComputing/Chapter4
4+
#
5+
# The built image can be found at:
6+
#
7+
# https://hub.docker.com/r/essentialsofparallelcomputing/chapter4
8+
#
9+
# Author:
10+
# Bob Robey <brobey@earthlink.net>
11+
12+
FROM ubuntu:20.04 AS builder
13+
LABEL maintainer Bob Robey <brobey@earthlink.net>
14+
15+
ARG DOCKER_LANG=en_US
16+
ARG DOCKER_TIMEZONE=America/Denver
17+
18+
WORKDIR /tmp
19+
RUN apt-get -qq update && \
20+
DEBIAN_FRONTEND=noninteractive \
21+
apt-get -qq install -y locales tzdata && \
22+
apt-get clean && rm -rf /var/lib/apt/lists/*
23+
24+
ENV LANG=$DOCKER_LANG.UTF-8 \
25+
LANGUAGE=$DOCKER_LANG:UTF-8
26+
27+
RUN ln -fs /usr/share/zoneinfo/$DOCKER_TIMEZONE /etc/localtime && \
28+
locale-gen $LANG && update-locale LANG=$LANG && \
29+
dpkg-reconfigure -f noninteractive locales tzdata
30+
31+
ENV LC_ALL=$DOCKER_LANG.UTF-8
32+
33+
RUN apt-get -qq update && \
34+
DEBIAN_FRONTEND=noninteractive \
35+
apt-get -qq install -y cmake git vim gcc g++ gfortran software-properties-common \
36+
python3 wget gnupg-agent \
37+
mpich libmpich-dev \
38+
openmpi-bin openmpi-doc libopenmpi-dev
39+
40+
# Installing latest GCC compiler (version 10)
41+
RUN apt-get -qq update && \
42+
apt-get -qq install -y gcc-8 g++-8 gfortran-8 \
43+
gcc-10 g++-10 gfortran-10 && \
44+
apt-get clean && rm -rf /var/lib/apt/lists/*
45+
46+
# Problem with compile of compact hash neighbor with gcc-10
47+
RUN update-alternatives \
48+
--install /usr/bin/gcc gcc /usr/bin/gcc-8 90 \
49+
--slave /usr/bin/g++ g++ /usr/bin/g++-8 \
50+
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-8 \
51+
--slave /usr/bin/gcov gcov /usr/bin/gcov-8 && \
52+
update-alternatives \
53+
--install /usr/bin/gcc gcc /usr/bin/gcc-9 80 \
54+
--slave /usr/bin/g++ g++ /usr/bin/g++-9 \
55+
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-9 \
56+
--slave /usr/bin/gcov gcov /usr/bin/gcov-9 && \
57+
update-alternatives \
58+
--install /usr/bin/gcc gcc /usr/bin/gcc-10 70 \
59+
--slave /usr/bin/g++ g++ /usr/bin/g++-10 \
60+
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-10 \
61+
--slave /usr/bin/gcov gcov /usr/bin/gcov-10 && \
62+
chmod u+s /usr/bin/update-alternatives
63+
64+
# Intel graphics software for computation
65+
RUN wget -q https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
66+
RUN apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
67+
RUN rm -f GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
68+
RUN echo "deb https://apt.repos.intel.com/oneapi all main" >> /etc/apt/sources.list.d/oneAPI.list
69+
RUN echo "deb [trusted=yes arch=amd64] https://repositories.intel.com/graphics/ubuntu bionic main" >> /etc/apt/sources.list.d/intel-graphics.list
70+
71+
RUN apt-get -qq update && \
72+
apt-get -qq install -y \
73+
intel-basekit-getting-started \
74+
intel-hpckit-getting-started \
75+
intel-oneapi-common-vars \
76+
intel-oneapi-common-licensing \
77+
intel-oneapi-dev-utilities \
78+
intel-oneapi-icc \
79+
intel-oneapi-ifort \
80+
intel-opencl && \
81+
apt-get clean && rm -rf /var/lib/apt/lists/*
82+
83+
# Generic OpenCL Loader
84+
RUN apt-get -qq update && \
85+
apt-get -qq install -y clinfo ocl-icd-libopencl1 ocl-icd-* opencl-headers && \
86+
apt-get clean && rm -rf /var/lib/apt/lists/*
87+
#apt-get -qq install -y clinfo ocl-icd-libopencl1 ocl-icd opencl-headers && \
88+
89+
# Nvidia GPU software for computation
90+
RUN wget -q https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.2.89-1_amd64.deb
91+
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
92+
RUN dpkg -i cuda-repo-ubuntu1804_10.2.89-1_amd64.deb
93+
RUN apt-get -qq update && \
94+
apt-get -qq install -y cuda-toolkit-10-2 cuda-tools-10-2 cuda-compiler-10-2 \
95+
cuda-libraries-10-2 cuda-libraries-dev-10-2 libnvidia-compute-450 && \
96+
apt-get clean && rm -rf /var/lib/apt/lists/*
97+
98+
#RUN wget -q https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804-11-0-local_11.0.1-450.36.06-1_amd64.deb
99+
#RUN dpkg -i cuda-repo-ubuntu1804-11-0-local_11.0.1-450.36.06-1_amd64.deb
100+
#RUN wget -q https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.2.89-1_amd64.deb
101+
#RUN wget -q https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-11-0_11.0.1-1_amd64.deb
102+
#RUN dpkg -i cuda-11-0_11.0.1-1_amd64.deb
103+
104+
# ROCm software installation
105+
RUN apt-get -qq update && \
106+
apt-get -qq install -y libnuma-dev && \
107+
apt-get clean && rm -rf /var/lib/apt/lists/*
108+
109+
RUN wget -qO - http://repo.radeon.com/rocm/apt/debian/rocm.gpg.key | apt-key add -
110+
RUN echo 'deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ xenial main' >> /etc/apt/sources.list.d/rocm.list
111+
RUN apt-get -qq update && \
112+
apt-get -qq install -y rocm-opencl-dev rocm-dkms && \
113+
apt-get clean && rm -rf /var/lib/apt/lists/*
114+
115+
# Vendor OpenCL
116+
RUN apt-get -qq update && \
117+
apt-get -qq install -y mesa-opencl-icd && \
118+
apt-get clean && rm -rf /var/lib/apt/lists/*
119+
120+
SHELL ["/bin/bash", "-c"]
121+
122+
RUN groupadd chapter5 && useradd -m -s /bin/bash -g chapter5 chapter5
123+
124+
RUN usermod -a -G video chapter5
125+
126+
WORKDIR /home/chapter5
127+
RUN chown -R chapter5:chapter5 /home/chapter5
128+
USER chapter5
129+
ENV PATH=${PATH}:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin/x86_64
130+
ENV PATH=/usr/local/cuda-10.2/bin:/usr/local/cuda-10.2/NsightCompute-2019.1${PATH:+:${PATH}}
131+
ENV LD_LIBRARY_PATH=/usr/local/cuda-10.2/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
132+
#RUN source /opt/intel/oneapi/setvars.sh
133+
134+
RUN git clone --recursive https://github.com/essentialsofparallelcomputing/Chapter5.git
135+
136+
WORKDIR /home/chapter5/Chapter5
137+
#RUN make
138+
139+
ENTRYPOINT ["bash"]

Dockerfile.Ubuntu18.04

Lines changed: 0 additions & 105 deletions
This file was deleted.

Dockerfile.Ubuntu20.04

Lines changed: 0 additions & 97 deletions
This file was deleted.

0 commit comments

Comments
 (0)