You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@madlib.apache.org by nj...@apache.org on 2019/04/22 22:50:25 UTC

[madlib] 01/02: Infra: Update jenkins docker image for DL

This is an automated email from the ASF dual-hosted git repository.

njayaram pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/madlib.git

commit f971fa4c2290eec8baf689a8877efb3c4b1743d2
Author: Nandish Jayaram <nj...@apache.org>
AuthorDate: Wed Apr 17 16:26:11 2019 -0700

    Infra: Update jenkins docker image for DL
    
    JIRA: MADLIB-1311
    Jenkins docker image now pulls down Postgres 10, and also has tensorflow
    and Keras installed in it. The default cmake is good to build MADlib, so
    we don't have to build it from source like how we did previously.
    
    Closes #371
    Co-authored-by: Orhan Kislal <ok...@apache.org>
---
 tool/docker/base/Dockerfile_postgres_10_Jenkins | 39 +++++++++++++++++++++++++
 tool/jenkins/jenkins_build.sh                   |  8 ++---
 2 files changed, 43 insertions(+), 4 deletions(-)

diff --git a/tool/docker/base/Dockerfile_postgres_10_Jenkins b/tool/docker/base/Dockerfile_postgres_10_Jenkins
new file mode 100644
index 0000000..5f93168
--- /dev/null
+++ b/tool/docker/base/Dockerfile_postgres_10_Jenkins
@@ -0,0 +1,39 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+FROM postgres:10
+
+### Get postgres specific add-ons
+RUN apt-get update && apt-get install -y  wget \
+                       build-essential \
+                       postgresql-server-dev-10 \
+                       postgresql-plpython-10 \
+                       openssl \
+                       libssl-dev \
+                       libboost-all-dev \
+                       m4 \
+                       rpm \
+                       python-pip \
+                       python-dev \
+                       build-essential \
+                       cmake
+
+RUN pip install tensorflow keras
+
+## To build an image from this docker file, from madlib folder, run:
+# docker build -t madlib/postgres_10:jenkins -f tool/docker/base/Dockerfile_postgres_10_Jenkins .
diff --git a/tool/jenkins/jenkins_build.sh b/tool/jenkins/jenkins_build.sh
index 1d7d897..8bd46cc 100755
--- a/tool/jenkins/jenkins_build.sh
+++ b/tool/jenkins/jenkins_build.sh
@@ -45,14 +45,14 @@ docker rm madlib
 
 echo "Creating docker container"
 # Pull down the base docker images
-echo "docker pull madlib/postgres_9.6:jenkins"
-docker pull madlib/postgres_9.6:jenkins
+echo "docker pull madlib/postgres_10:jenkins"
+docker pull madlib/postgres_10:jenkins
 # Launch docker container with volume mounted from workdir
 echo "-------------------------------"
 cat <<EOF
-docker run -d --name madlib -v "${workdir}/${reponame}":/madlib madlib/postgres_9.6:jenkins | tee logs/docker_setup.log
+docker run -d --name madlib -v "${workdir}/${reponame}":/madlib madlib/postgres_10:jenkins | tee logs/docker_setup.log
 EOF
-docker run -d --name madlib -v "${workdir}/${reponame}":/madlib madlib/postgres_9.6:jenkins | tee logs/docker_setup.log
+docker run -d --name madlib -v "${workdir}/${reponame}":/madlib madlib/postgres_10:jenkins | tee logs/docker_setup.log
 echo "-------------------------------"
 
 ## This sleep is required since it takes a couple of seconds for the docker