-
Notifications
You must be signed in to change notification settings - Fork 214
/
Copy pathDockerfile
51 lines (40 loc) · 1.38 KB
/
Dockerfile
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
FROM centos:7
ENV GLIBC "glibc glibc-common glibc-devel glibc-headers"
RUN yum --disablerepo updates -y install $GLIBC
RUN yum -x "$GLIBC" -y update && yum -x "$GLIBC" -y install centos-release-scl-rh && yum -x "$GLIBC" -y install \
scl-utils \
epel-release \
java-1.8.0-openjdk-devel \
devtoolset-9 \
unzip \
which \
rh-git218 \
patch \
perl-Data-Dumper \
python36-devel && yum -x "$GLIBC" -y install \
python36-numpy \
python36-pip \
python36-six
RUN echo "Downloading Maven" && \
curl -L https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz -o $HOME/apache-maven-3.6.3-bin.tar.gz && \
tar xzf $HOME/apache-maven-3.6.3-bin.tar.gz -C /opt/ && \
ln -sf /opt/apache-maven-3.6.3/bin/mvn /usr/bin/mvn
RUN echo "Downloading Bazel" && \
curl -L https://github.com/bazelbuild/bazel/releases/download/3.7.2/bazel-3.7.2-installer-linux-x86_64.sh -o bazel.sh --retry 10 && \
bash bazel.sh
ARG GPU=false
ADD install_cuda.sh /install_cuda.sh
RUN chmod a+x /install_cuda.sh
RUN /install_cuda.sh
ENV JAVA_HOME /usr/lib/jvm/java-1.8.0
ADD scl_enable.sh /scl_enable.sh
RUN chmod a+x /scl_enable.sh
ADD entrypoint.sh /entrypoint
ENTRYPOINT [ "/entrypoint" ]
RUN chmod a+x /entrypoint
ENV CI=true
VOLUME /root/.m2
VOLUME /root/.cache/bazel
ENV BASH_ENV=/scl_enable.sh \
ENV=/scl_enable.sh \
PROMPT_COMMAND=". /scl_enable.sh"