-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.stage01
54 lines (48 loc) · 1.92 KB
/
Dockerfile.stage01
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
FROM nvidia/cuda:10.2-cudnn7-devel-centos7
MAINTAINER Andreas Fink <[email protected]>
# Update all packages and install the development toolset (newer version of GNU gcc and tools)
RUN yum -y update \
&& yum install -y centos-release-scl \
&& yum install -y devtoolset-7 \
&& yum group install -y "Development Tools" \
&& yum install -y blas-devel lapack-devel wget zlib-devel python-devel openssl-devel \
&& echo 'source scl_source enable devtoolset-7' >> ~/.bashrc \
&& source scl_source enable devtoolset-7 \
&& yum clean all
# Add EPEL repository
#RUN wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
# && rpm -ivh epel-release-latest-7.noarch.rpm \
# && rm epel-release-latest-7.noarch.rpm
#RUN yum -y update \
# && yum install -y --enablerepo=epel netcdf-mpich-devel netcdf-devel \
# && yum clean all
RUN cd /tmp \
&& source scl_source enable devtoolset-7 \
&& echo $(which gfortran) \
&& gfortran --version \
&& wget -q http://www.mpich.org/static/downloads/3.1.4/mpich-3.1.4.tar.gz \
&& tar xf mpich-3.1.4.tar.gz \
&& cd mpich-3.1.4 \
&& ./configure --enable-fast=all,O3 --prefix=/usr \
&& make -j$(nproc) \
&& make install \
&& ldconfig \
&& cd .. \
&& rm -rf mpich-3.1.4 \
&& rm -f mpich-3.1.4.tar.gz
RUN cd /tmp \
&& source scl_source enable devtoolset-7 \
&& wget https://github.com/Kitware/CMake/releases/download/v3.16.4/cmake-3.16.4.tar.gz \
&& tar -xf cmake-3.16.4.tar.gz \
&& cd cmake-3.16.4 \
&& ./configure --prefix=/usr \
&& make -j4 \
&& make install \
&& cd /tmp \
&& rm -Rf cmake-3.16.4*
COPY buildscripts /tmp/buildscripts
SHELL ["/bin/bash", "-c"]
RUN source scl_source enable devtoolset-7 \
&&/tmp/buildscripts/build_cpu.sh /tmp/build /opt_scientific/libs 1 \
&& echo "source scl_source enable devtoolset-7" >> /opt_scientific/libs/environment \
&& rm -Rf /tmp/build