Skip to content

Commit

Permalink
fix jdk in az docker (#3478)
Browse files Browse the repository at this point in the history
* fix jdk in az docker

* fix jdk for hyperzoo

* fix jdk in jenkins docker

* fix jdk in cluster serving docker

* fix jdk

* fix readme
  • Loading branch information
glorysdj authored Feb 8, 2021
1 parent 87e84ce commit 1df01ff
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 35 deletions.
13 changes: 8 additions & 5 deletions docker/cluster-serving/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ ARG SPARK_VERSION=2.4.3
ARG BIGDL_VERSION=0.12.1
ARG ANALYTICS_ZOO_VERSION=0.9.0
ARG FLINK_VERSION=1.11.2
ARG JDK_VERSION=8u192
ARG JDK_URL=your_jdk_url

ENV FLINK_HOME /opt/work/flink-${FLINK_VERSION}
ENV JAVA_HOME /opt/jdk
Expand All @@ -29,11 +31,12 @@ RUN apt-get install -y python3-minimal && \
pip install analytics-zoo-serving

#java
RUN wget https://enos.itcollege.ee/~jpoial/allalaadimised/jdk8/jdk-8u281-linux-x64.tar.gz && \
gunzip jdk-8u281-linux-x64.tar.gz && \
tar -xf jdk-8u281-linux-x64.tar -C /opt && \
rm jdk-8u281-linux-x64.tar && \
ln -s /opt/jdk1.8.0_281 /opt/jdk
RUN wget $JDK_URL && \
gunzip jdk-$JDK_VERSION-linux-x64.tar.gz && \
tar -xf jdk-$JDK_VERSION-linux-x64.tar -C /opt && \
rm jdk-$JDK_VERSION-linux-x64.tar && \
mv /opt/jdk* /opt/jdk$JDK_VERSION && \
ln -s /opt/jdk$JDK_VERSION /opt/jdk

#redis
RUN wget http://download.redis.io/releases/redis-5.0.5.tar.gz && \
Expand Down
13 changes: 8 additions & 5 deletions docker/hyperzoo/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ ARG ANALYTICS_ZOO_VERSION=0.10.0-SNAPSHOT
ARG BIGDL_VERSION=0.12.1
ARG SPARK_VERSION=2.4.3
ARG FLINK_VERSION=1.10.0
ARG JDK_VERSION=8u192
ARG JDK_URL=your_jdk_url

ENV FLINK_HOME /opt/flink-${FLINK_VERSION}
ENV ANALYTICS_ZOO_VERSION ${ANALYTICS_ZOO_VERSION}
Expand Down Expand Up @@ -55,11 +57,12 @@ RUN wget https://repo.anaconda.com/miniconda/Miniconda3-py37_4.8.3-Linux-x86_64.
bash Miniconda3-py37_4.8.3-Linux-x86_64.sh -b && \
rm -f Miniconda3-py37_4.8.3-Linux-x86_64.sh && \
#java
wget https://enos.itcollege.ee/~jpoial/allalaadimised/jdk8/jdk-8u281-linux-x64.tar.gz && \
gunzip jdk-8u281-linux-x64.tar.gz && \
tar -xf jdk-8u281-linux-x64.tar -C /opt && \
rm jdk-8u281-linux-x64.tar && \
ln -s /opt/jdk1.8.0_281 /opt/jdk && \
wget $JDK_URL && \
gunzip jdk-$JDK_VERSION-linux-x64.tar.gz && \
tar -xf jdk-$JDK_VERSION-linux-x64.tar -C /opt && \
rm jdk-$JDK_VERSION-linux-x64.tar && \
mv /opt/jdk* /opt/jdk$JDK_VERSION && \
ln -s /opt/jdk$JDK_VERSION /opt/jdk && \
#spark
wget https://archive.apache.org/dist/spark/spark-${SPARK_VERSION}/spark-${SPARK_VERSION}-bin-hadoop2.7.tgz && \
tar -zxvf spark-${SPARK_VERSION}-bin-hadoop2.7.tgz && \
Expand Down
30 changes: 22 additions & 8 deletions docker/jenkins-ci/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,20 @@ Jenkins has master nodes and slave agents. To make Jenkins well functioning, mas
### 1.1 Build master
First, you should step into the directory jenkins-master and run
```bash
sudo docker build --rm -t intelanalytics/jenkins-master .
sudo docker build \
--build-arg JDK_VERSION=8u192 \
--build-arg JDK_URL=http://your-http-url-to-download-jdk \
--rm -t intelanalytics/jenkins-master .
```
If proxy is needed for building the image, building arguments related to proxy should be added in the command above. For example,
```bash
sudo docker build --build-arg http_proxy=http://yourproxyhost:port \
--build-arg https_proxy=https://yourproxyhost:port \
--rm -t intelanalytics/jenkins-master .
sudo docker build \
--build-arg http_proxy=http://yourproxyhost:port \
--build-arg https_proxy=https://yourproxyhost:port \
--build-arg JDK_VERSION=8u192 \
--build-arg JDK_URL=http://your-http-url-to-download-jdk \
--build-arg no_proxy=x.x.x.x \
--rm -t intelanalytics/jenkins-master .
```
Note that you can set any tag of the image by changine the parameter after the option -t.

Expand All @@ -25,13 +32,20 @@ There are some extra files other than Dockerfile in the directory jenkins-master
### 1.2 Build slaves
Building Jenkins slave is similar to building Jenkins master. First, step into the directory jenkins-slave and run
```bash
sudo docker build --rm -t intelanalytics/jenkins-slave .
sudo docker build \
--build-arg JDK_VERSION=8u192 \
--build-arg JDK_URL=http://your-http-url-to-download-jdk \
--rm -t intelanalytics/jenkins-slave .
```
If proxy is needed for building the image, the following command should be run.
```bash
sudo docker build --build-arg http_proxy=http://yourproxyhost:port \
--build-arg https_proxy=https://yourproxyhost:port \
--rm -t intelanalytics/jenkins-slave .
sudo docker build \
--build-arg http_proxy=http://yourproxyhost:port \
--build-arg https_proxy=https://yourproxyhost:port \
--build-arg JDK_VERSION=8u192 \
--build-arg JDK_URL=http://your-http-url-to-download-jdk \
--build-arg no_proxy=x.x.x.x \
--rm -t intelanalytics/jenkins-slave .
```
There are some extra files other than Dockerfile in the directory jenkins-slave.
+ pip.conf: provide configurations of pip
Expand Down
14 changes: 9 additions & 5 deletions docker/jenkins-ci/jenkins-master/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ MAINTAINER The Analytics-Zoo Authors https://github.com/intel-analytics/analytic

WORKDIR /opt/work

ARG JDK_VERSION=8u192
ARG JDK_URL=your_jdk_url

ENV JAVA_HOME /opt/work/jdk
ENV JAVA_OPTS -Djenkins.install.runSetupWizard=false
ENV JENKINS_HOME /opt/work/jenkins
Expand All @@ -23,11 +26,12 @@ COPY jenkins.sh ${JENKINS_HOME}/jenkins.sh
RUN apt-get update && apt-get install -y git wget curl && rm -rf /var/lib/apt/lists/*

#java
RUN wget https://enos.itcollege.ee/~jpoial/allalaadimised/jdk8/jdk-8u281-linux-x64.tar.gz && \
gunzip jdk-8u281-linux-x64.tar.gz && \
tar -xf jdk-8u281-linux-x64.tar -C /opt && \
rm jdk-8u281-linux-x64.tar && \
ln -s /opt/jdk1.8.0_281 /opt/jdk
RUN wget $JDK_URL && \
gunzip jdk-$JDK_VERSION-linux-x64.tar.gz && \
tar -xf jdk-$JDK_VERSION-linux-x64.tar -C /opt && \
rm jdk-$JDK_VERSION-linux-x64.tar && \
mv /opt/jdk* /opt/jdk$JDK_VERSION && \
ln -s /opt/jdk$JDK_VERSION /opt/jdk

# Install Jenkins Master
RUN curl -fsSL ${JENKINS_URL} -o ${JENKINS_HOME}/jenkins.war && \
Expand Down
14 changes: 9 additions & 5 deletions docker/jenkins-ci/jenkins-slave/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ FROM ubuntu:16.04

WORKDIR /opt/work

ARG JDK_VERSION=8u192
ARG JDK_URL=your_jdk_url

ENV JAVA_8_HOME /opt/work/jdk8
ENV JAVA_HOME ${JAVA_8_HOME}
ENV SCALA_HOME /opt/work/scala
Expand Down Expand Up @@ -30,11 +33,12 @@ RUN apt-get update --fix-missing && \
apt-get install -y libgtk2.0-dev

#jdk8
RUN wget https://enos.itcollege.ee/~jpoial/allalaadimised/jdk8/jdk-8u281-linux-x64.tar.gz && \
gunzip jdk-8u281-linux-x64.tar.gz && \
tar -xf jdk-8u281-linux-x64.tar -C /opt && \
rm jdk-8u281-linux-x64.tar && \
ln -s /opt/jdk1.8.0_281 /opt/jdk && \
RUN wget $JDK_URL && \
gunzip jdk-$JDK_VERSION-linux-x64.tar.gz && \
tar -xf jdk-$JDK_VERSION-linux-x64.tar -C /opt && \
rm jdk-$JDK_VERSION-linux-x64.tar && \
mv /opt/jdk* /opt/jdk$JDK_VERSION && \
ln -s /opt/jdk$JDK_VERSION /opt/jdk && \
#scala
wget https://downloads.lightbend.com/scala/2.11.8/scala-2.11.8.tgz && \
gunzip scala-2.11.8.tgz && \
Expand Down
13 changes: 8 additions & 5 deletions docker/zoo/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ ARG RUNTIME_DRIVER_MEMORY=20g
ARG RUNTIME_EXECUTOR_CORES=4
ARG RUNTIME_EXECUTOR_MEMORY=20g
ARG RUNTIME_TOTAL_EXECUTOR_CORES=4
ARG JDK_VERSION=8u192
ARG JDK_URL=your_jdk_url
ENV ANALYTICS_ZOO_VERSION ${ANALYTICS_ZOO_VERSION}
ENV SPARK_VERSION ${SPARK_VERSION}
ENV BIGDL_VERSION ${BIGDL_VERSION}
Expand All @@ -48,11 +50,12 @@ RUN apt-get update --fix-missing && \
apt-get install -y libsm6

#java
RUN wget https://enos.itcollege.ee/~jpoial/allalaadimised/jdk8/jdk-8u281-linux-x64.tar.gz && \
gunzip jdk-8u281-linux-x64.tar.gz && \
tar -xf jdk-8u281-linux-x64.tar -C /opt && \
rm jdk-8u281-linux-x64.tar && \
ln -s /opt/jdk1.8.0_281 /opt/jdk
RUN wget $JDK_URL && \
gunzip jdk-$JDK_VERSION-linux-x64.tar.gz && \
tar -xf jdk-$JDK_VERSION-linux-x64.tar -C /opt && \
rm jdk-$JDK_VERSION-linux-x64.tar && \
mv /opt/jdk* /opt/jdk$JDK_VERSION && \
ln -s /opt/jdk$JDK_VERSION /opt/jdk

#python
RUN apt-get install -y python3-minimal && \
Expand Down
13 changes: 11 additions & 2 deletions docker/zoo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,31 @@

## How to build it.

### By default, you can build a Analytics-Zoo:default image with latest nightly-build Analytics-Zoo distributions:
### By default, you can build a Analytics-Zoo:default image with latest nightly-build Analytics-Zoo distributions, you also need to provide jdk version and jdk download url:

sudo docker build --rm -t intelanalytics/analytics-zoo:default .
sudo docker build \
--build-arg JDK_VERSION=8u192 \
--build-arg JDK_URL=http://your-http-url-to-download-jdk \
--rm -t intelanalytics/analytics-zoo:default .

### If you need http and https proxy to build the image:

sudo docker build \
--build-arg http_proxy=http://your-proxy-host:your-proxy-port \
--build-arg https_proxy=https://your-proxy-host:your-proxy-port \
--build-arg JDK_VERSION=8u192 \
--build-arg JDK_URL=http://your-http-url-to-download-jdk \
--build-arg no_proxy=x.x.x.x \
--rm -t intelanalytics/analytics-zoo:default .

### You can also specify the ANALYTICS_ZOO_VERSION and SPARK_VERSION to build a specific Analytics-Zoo image:

sudo docker build \
--build-arg http_proxy=http://your-proxy-host:your-proxy-port \
--build-arg https_proxy=https://your-proxy-host:your-proxy-port \
--build-arg JDK_VERSION=8u192 \
--build-arg JDK_URL=http://your-http-url-to-download-jdk \
--build-arg no_proxy=x.x.x.x \
--build-arg ANALYTICS_ZOO_VERSION=0.3.0 \
--build-arg BIGDL_VERSION=0.6.0 \
--build-arg SPARK_VERSION=2.3.1 \
Expand Down

0 comments on commit 1df01ff

Please sign in to comment.