forked from h2oai/h2o-3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
68 lines (54 loc) · 1.95 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
########################################################################
# Dockerfile for Oracle JDK 8 on Ubuntu 16.04
########################################################################
# pull base image
FROM ubuntu:16.04
# maintainer details
MAINTAINER h2oai "h2o.ai"
# add a post-invoke hook to dpkg which deletes cached deb files
# update the sources.list
# update/dist-upgrade
# clear the caches
RUN \
echo 'DPkg::Post-Invoke {"/bin/rm -f /var/cache/apt/archives/*.deb || true";};' | tee /etc/apt/apt.conf.d/no-cache && \
echo "deb http://mirror.math.princeton.edu/pub/ubuntu xenial main universe" >> /etc/apt/sources.list && \
apt-get update -q -y && \
apt-get dist-upgrade -y && \
apt-get clean && \
rm -rf /var/cache/apt/* && \
DEBIAN_FRONTEND=noninteractive apt-get install -y wget unzip openjdk-8-jdk python-pip python-sklearn python-pandas python-numpy python-matplotlib software-properties-common python-software-properties && \
apt-get clean
# Fetch h2o latest_stable
RUN \
wget http://h2o-release.s3.amazonaws.com/h2o/latest_stable -O latest && \
wget -i latest -O /opt/h2o.zip && \
unzip -d /opt /opt/h2o.zip && \
rm /opt/h2o.zip && \
cd /opt && \
cd `find . -name 'h2o.jar' | sed 's/.\///;s/\/h2o.jar//g'` && \
cp h2o.jar /opt && \
/usr/bin/pip install `find . -name "*.whl"` && \
printf '!/bin/bash\ncd /home/h2o\n./start-h2o-docker.sh\n' > /start-h2o-docker.sh && \
chmod +x /start-h2o-docker.sh
RUN \
useradd -m -c "h2o.ai" h2o
USER h2o
# Get Content
RUN \
cd && \
wget https://raw.githubusercontent.com/h2oai/h2o-3/master/docker/start-h2o-docker.sh && \
chmod +x start-h2o-docker.sh && \
wget http://s3.amazonaws.com/h2o-training/mnist/train.csv.gz && \
gunzip train.csv.gz
# Define a mountable data directory
#VOLUME \
# ["/data"]
# Define the working directory
WORKDIR \
/home/h2o
EXPOSE 54321
EXPOSE 54322
#ENTRYPOINT ["java", "-Xmx4g", "-jar", "/opt/h2o.jar"]
# Define default command
CMD \
["/bin/bash"]