-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
55 lines (45 loc) · 1.96 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
52
53
54
FROM centos:centos7
MAINTAINER "Henrique Costa" henrique.costa@gmail.com
WORKDIR /tmp/
#Install JAVA
RUN curl -L -O -H 'Cookie: oraclelicense=accept-securebackup-cookie' 'http://download.oracle.com/otn-pub/java/jdk/8u181-b13/96a7b8442fe848ef90c96a2fad6ed6d1/jdk-8u181-linux-x64.rpm' \
&& yum install -y /tmp/jdk-8u181-linux-x64.rpm \
bzip2 \
maven \
git \
&& yum groupinstall -y 'Development Tools' \
&& yum clean all
#Java environment
ENV JAVA_HOME /usr/java/jdk1.8.0_181-amd64
RUN alternatives --set java $JAVA_HOME/jre/bin/java \
&& alternatives --set javac $JAVA_HOME/bin/javac
#Environment setup related to Python+JEP
ENV CONDA_HOME /root/miniconda3
ENV PATH $CONDA_HOME/bin:$PATH
ENV CONDA_ENVIRONMENT conda-environment
ENV JEP_LOCATION ${CONDA_HOME}/envs/${CONDA_ENVIRONMENT}/lib/python3.6/site-packages/jep
ENV JEP_JAR ${JEP_LOCATION}/jep-3.7.1.jar
# Most software that requires JEP will probably need to point to the dyn libs generated by the command above
ENV LD_LIBRARY_PATH ${JEP_LOCATION}:${LD_LIBRARY_PATH}
# Processes that must see the correct python must add this variable to LD_PRELOAD
# We don't do it here since that breaks yum
ENV TO_PRELOAD ${CONDA_HOME}/envs/${CONDA_ENVIRONMENT}/lib/libpython3.6m.so
WORKDIR /root/
# Install python+conda and H2O
RUN echo "Installing Miniconda..." \
&& curl -L -O 'https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh' \
&& bash Miniconda3-latest-Linux-x86_64.sh -b \
&& echo "Done." \
&& echo "Creating environment..." \
&& conda create -y -n ${CONDA_ENVIRONMENT} python=3.6 numpy scipy pandas scikit-learn \
&& echo "Done." \
&& source activate ${CONDA_ENVIRONMENT} \
&& pip install xgboost \
&& cd /opt \
&& git clone https://github.com/ninia/jep.git \
&& cd jep \
&& echo "Installing JEP..." \
&& git checkout v3.7.1 \
&& python setup.py build install \
&& conda clean -y -a \
&& yum clean all