From 97d8383878a054040206a378362ac7a0b251e406 Mon Sep 17 00:00:00 2001 From: Dan Crankshaw Date: Wed, 30 Aug 2017 09:17:09 +0000 Subject: [PATCH] pretty sure dockerized tests are passing --- ClipperTestsDockerfile | 41 +++++++++++++++++++++++++++++++------- bin/build_docker_images.sh | 5 ++--- bin/ci_checks.sh | 15 ++++++++++++++ 3 files changed, 51 insertions(+), 10 deletions(-) create mode 100755 bin/ci_checks.sh diff --git a/ClipperTestsDockerfile b/ClipperTestsDockerfile index a4aac5748..1bba1fe54 100644 --- a/ClipperTestsDockerfile +++ b/ClipperTestsDockerfile @@ -4,23 +4,50 @@ FROM clipper/lib_base:${CODE_VERSION} # install docker RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install --fix-missing -y \ wget apt-transport-https ca-certificates curl software-properties-common \ + openjdk-8-jdk clang-format \ && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \ && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ && apt-get update \ - && apt-get install --fix-missing -y docker-ce + && apt-get install -y docker-ce RUN echo 'export PATH=/opt/conda/bin:$PATH' > /etc/profile.d/conda.sh \ && wget --quiet 'https://repo.continuum.io/archive/Anaconda2-4.2.0-Linux-x86_64.sh' -O /tmp/anaconda.sh \ && /bin/bash /tmp/anaconda.sh -b -p /opt/conda \ && rm /tmp/anaconda.sh ENV PATH "/opt/conda/bin:$PATH" -RUN conda install -y pyzmq +RUN conda install -y libgcc pyzmq -RUN pip install requests subprocess32 scikit-learn numpy scipy fabric pyyaml docker kubernetes pyspark +RUN pip install requests subprocess32 scikit-learn numpy scipy fabric pyyaml docker \ + kubernetes pyspark docker-compose findspark + +RUN mkdir /spark && cd /spark \ + && curl -o spark.tgz https://d3kbcqa49mib13.cloudfront.net/spark-2.1.1-bin-hadoop2.7.tgz \ + && tar zxf spark.tgz && rm spark.tgz + +ENV SPARK_HOME /spark/spark-2.1.1-bin-hadoop2.7 + +# Install maven +ARG MAVEN_VERSION=3.5.0 +ARG SHA=beb91419245395bd69a4a6edad5ca3ec1a8b64e41457672dc687c173a495f034 +ARG BASE_URL=https://apache.osuosl.org/maven/maven-3/${MAVEN_VERSION}/binaries + +RUN mkdir -p /usr/share/maven /usr/share/maven/ref \ + && curl -fsSL -o /tmp/apache-maven.tar.gz ${BASE_URL}/apache-maven-$MAVEN_VERSION-bin.tar.gz \ + && echo "${SHA} /tmp/apache-maven.tar.gz" | sha256sum -c - \ + && tar -xzf /tmp/apache-maven.tar.gz -C /usr/share/maven --strip-components=1 \ + && rm -f /tmp/apache-maven.tar.gz \ + && ln -s /usr/share/maven/bin/mvn /usr/bin/mvn \ + && git clone https://github.com/zeromq/jzmq.git /root/jzmq \ + && cd /root/jzmq/jzmq-jni \ + && ./autogen.sh \ + && ./configure \ + && make \ + && make install + +ENV MAVEN_HOME /usr/share/maven +ENV MAVEN_CONFIG /root/.m2 +ENV JZMQ_HOME /usr/local/lib/ -# RUN gpasswd -a $NB_USER docker - -RUN DEBIAN_FRONTEND=noninteractive apt-get install --fix-missing -y clang-format COPY ./ /clipper @@ -29,6 +56,6 @@ RUN cd /clipper/src/libs/spdlog \ && git apply ../patches/make_spdlog_compile_linux.patch -ENTRYPOINT ["/clipper/bin/check_format.sh"] +ENTRYPOINT ["/clipper/bin/ci_checks.sh"] # vim: set filetype=dockerfile: diff --git a/bin/build_docker_images.sh b/bin/build_docker_images.sh index 67d1f9b84..467a73ead 100755 --- a/bin/build_docker_images.sh +++ b/bin/build_docker_images.sh @@ -18,10 +18,9 @@ tag=$(