SINGA-303 Create conda packages update Dockerfile for generating docs. replace wheel with conda package as conda can avoid the lib path problems.
Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/a3f34cb0 Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/a3f34cb0 Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/a3f34cb0 Branch: refs/heads/master Commit: a3f34cb0764c694dd9b6db00f10ac43aab98515b Parents: ca0be88 Author: wangwei <[email protected]> Authored: Fri Feb 24 23:55:50 2017 +0800 Committer: wangwei <[email protected]> Committed: Fri Feb 24 23:59:24 2017 +0800 ---------------------------------------------------------------------- tool/jenkins/docker/devel/Dockerfile | 67 ++++++++++++++++++++ tool/jenkins/docker/runtime/Dockerfile | 51 +++++++++++++++ .../jenkins/docker/ubuntu14.04/devel/Dockerfile | 67 -------------------- .../jenkins/docker/ubuntu16.04/devel/Dockerfile | 55 ---------------- .../docker/ubuntu16.04/runtime/Dockerfile | 43 ------------- 5 files changed, 118 insertions(+), 165 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/a3f34cb0/tool/jenkins/docker/devel/Dockerfile ---------------------------------------------------------------------- diff --git a/tool/jenkins/docker/devel/Dockerfile b/tool/jenkins/docker/devel/Dockerfile new file mode 100644 index 0000000..2ef191b --- /dev/null +++ b/tool/jenkins/docker/devel/Dockerfile @@ -0,0 +1,67 @@ +# 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. +# +# Base unbuntu 14.04 image from nvidia/cuda +# Change tags to build with different cuda/cudnn versions: +# FROM nvidia/cuda:8.0-cudnn5-devel-ubuntu14.04 +# FROM nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04 +# FROM nvidia/cuda:7.5-cudnn4-devel-ubuntu14.04 +# FROM nvidia/cuda:7.0-cudnn4-devel-ubuntu14.04 +FROM nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04 + +# install dependencies +RUN apt-get update \ + && apt-get install -y --no-install-recommends git build-essential autoconf libtool cmake libprotobuf-dev libopenblas-dev libpcre3-dev python-dev python-pip protobuf-compiler wget openssh-server \ + && apt-get clean && apt-get autoremove && apt-get autoclean \ + && rm -rf /var/lib/apt/lists/* \ + && pip install -U pip wheel numpy setuptools unittest-xml-reporting protobuf + + +# install swig 3.0 +RUN wget http://prdownloads.sourceforge.net/swig/swig-3.0.10.tar.gz && \ + tar zxf swig-3.0.10.tar.gz && cd swig-3.0.10 && \ + ./configure && make && make install + +# install conda, conda-build and anaconda-client +RUN wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh; +RUN bash miniconda.sh -b -p $HOME/miniconda +RUN $HOME/miniconda/bin/conda config --set always_yes yes --set changeps1 no +RUN $HOME/miniconda/bin/conda update -q conda +RUN $HOME/miniconda/bin/conda install conda-build +RUN $HOME/miniconda/bin/conda install anaconda-client +ENV PATH $HOME/miniconda/bin:${PATH} + +# set environment +ENV CPLUS_INCLUDE_PATH /usr/local/lib/python2.7/dist-packages/numpy/core/include:${CPLUS_INCLUDE_PATH} +# ENV CMAKE_INCLUDE_PATH /usr/local/cuda/include:${CMAKE_INCLUDE_PATH} +# ENV CMAKE_LIBRARY_PATH /usr/local/cuda/lib64:${CMAKE_LIBRARY_PATH} + +# download singa source +# RUN git clone https://github.com/apache/incubator-singa.git + +# config ssh service +RUN mkdir /var/run/sshd +RUN echo 'root:singa' | chpasswd +RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config +# SSH login fix. Otherwise user is kicked off after login +RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd + +# dump environment variables into files, so that ssh can see also +RUN env | grep _ >> /etc/environment + +EXPOSE 22 + +CMD ["/usr/sbin/sshd", "-D"] http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/a3f34cb0/tool/jenkins/docker/runtime/Dockerfile ---------------------------------------------------------------------- diff --git a/tool/jenkins/docker/runtime/Dockerfile b/tool/jenkins/docker/runtime/Dockerfile new file mode 100644 index 0000000..9f4aea3 --- /dev/null +++ b/tool/jenkins/docker/runtime/Dockerfile @@ -0,0 +1,51 @@ +#!/usr/bin/env sh +# +# 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. +# +# Base unbuntu 16.04 image +FROM ubuntu:latest + +MAINTAINER incubator-singa [email protected] + +# install dependencies +RUN apt-get update \ + && apt-get install -y --no-install-recommends subversion git wget openssh-server bzip2\ + && apt-get clean && apt-get autoremove && apt-get autoclean \ + && rm -rf /var/lib/apt/lists/* + +RUN wget --no-check-certificate https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh; +RUN bash miniconda.sh -b -p /root/miniconda +ENV PATH /root/miniconda/bin:${PATH} +RUN conda config --set always_yes yes --set changeps1 no +RUN conda update -q conda +RUN conda install -c conda-forge sphinx +RUN conda install -c conda-forge sphinx_rtd_theme +RUN conda install -c clinicalgraphics recommonmark=0.2.0 +RUN conda install -c nusdbsystem singa + +RUN mkdir /var/run/sshd +RUN echo 'root:singa' | chpasswd +RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config +# SSH login fix. Otherwise user is kicked off after login +RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd + +# dump environment variables into files, so that ssh can see also +# RUN env | grep _ >> /etc/environment + +EXPOSE 22 + +CMD ["/usr/sbin/sshd", "-D"] http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/a3f34cb0/tool/jenkins/docker/ubuntu14.04/devel/Dockerfile ---------------------------------------------------------------------- diff --git a/tool/jenkins/docker/ubuntu14.04/devel/Dockerfile b/tool/jenkins/docker/ubuntu14.04/devel/Dockerfile deleted file mode 100644 index 2ef191b..0000000 --- a/tool/jenkins/docker/ubuntu14.04/devel/Dockerfile +++ /dev/null @@ -1,67 +0,0 @@ -# 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. -# -# Base unbuntu 14.04 image from nvidia/cuda -# Change tags to build with different cuda/cudnn versions: -# FROM nvidia/cuda:8.0-cudnn5-devel-ubuntu14.04 -# FROM nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04 -# FROM nvidia/cuda:7.5-cudnn4-devel-ubuntu14.04 -# FROM nvidia/cuda:7.0-cudnn4-devel-ubuntu14.04 -FROM nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04 - -# install dependencies -RUN apt-get update \ - && apt-get install -y --no-install-recommends git build-essential autoconf libtool cmake libprotobuf-dev libopenblas-dev libpcre3-dev python-dev python-pip protobuf-compiler wget openssh-server \ - && apt-get clean && apt-get autoremove && apt-get autoclean \ - && rm -rf /var/lib/apt/lists/* \ - && pip install -U pip wheel numpy setuptools unittest-xml-reporting protobuf - - -# install swig 3.0 -RUN wget http://prdownloads.sourceforge.net/swig/swig-3.0.10.tar.gz && \ - tar zxf swig-3.0.10.tar.gz && cd swig-3.0.10 && \ - ./configure && make && make install - -# install conda, conda-build and anaconda-client -RUN wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh; -RUN bash miniconda.sh -b -p $HOME/miniconda -RUN $HOME/miniconda/bin/conda config --set always_yes yes --set changeps1 no -RUN $HOME/miniconda/bin/conda update -q conda -RUN $HOME/miniconda/bin/conda install conda-build -RUN $HOME/miniconda/bin/conda install anaconda-client -ENV PATH $HOME/miniconda/bin:${PATH} - -# set environment -ENV CPLUS_INCLUDE_PATH /usr/local/lib/python2.7/dist-packages/numpy/core/include:${CPLUS_INCLUDE_PATH} -# ENV CMAKE_INCLUDE_PATH /usr/local/cuda/include:${CMAKE_INCLUDE_PATH} -# ENV CMAKE_LIBRARY_PATH /usr/local/cuda/lib64:${CMAKE_LIBRARY_PATH} - -# download singa source -# RUN git clone https://github.com/apache/incubator-singa.git - -# config ssh service -RUN mkdir /var/run/sshd -RUN echo 'root:singa' | chpasswd -RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config -# SSH login fix. Otherwise user is kicked off after login -RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd - -# dump environment variables into files, so that ssh can see also -RUN env | grep _ >> /etc/environment - -EXPOSE 22 - -CMD ["/usr/sbin/sshd", "-D"] http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/a3f34cb0/tool/jenkins/docker/ubuntu16.04/devel/Dockerfile ---------------------------------------------------------------------- diff --git a/tool/jenkins/docker/ubuntu16.04/devel/Dockerfile b/tool/jenkins/docker/ubuntu16.04/devel/Dockerfile deleted file mode 100644 index 6dfce61..0000000 --- a/tool/jenkins/docker/ubuntu16.04/devel/Dockerfile +++ /dev/null @@ -1,55 +0,0 @@ -# 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. -# -# Base unbuntu 16.04 image from nvidia/cuda -# Change tags to build with different cuda/cudnn versions: -# FROM nvidia/cuda:8.0-cudnn5-devel-ubuntu16.04 -FROM nvidia/cuda:8.0-cudnn5-devel-ubuntu16.04 - -# install dependencies - -MAINTAINER incubator-singa [email protected] - -# install dependencies -RUN apt-get update \ - && apt-get install -y --no-install-recommends git g++ cmake python-dev python-pip swig wget openssh-server \ - && apt-get clean && apt-get autoremove && apt-get autoclean \ - && rm -rf /var/lib/apt/lists/* \ - && pip --no-cache-dir install -U pip wheel numpy setuptools unittest-xml-reporting protobuf - -# libprotobuf-dev libopenblas-dev protobuf-compiler \ - -# set environment -ENV CPLUS_INCLUDE_PATH /usr/local/lib/python2.7/dist-packages/numpy/core/include:${CPLUS_INCLUDE_PATH} -ENV CMAKE_INCLUDE_PATH /usr/local/cuda/include:${CMAKE_INCLUDE_PATH} -ENV CMAKE_LIBRARY_PATH /usr/local/cuda/lib64:${CMAKE_LIBRARY_PATH} - -# download singa source -RUN git clone https://github.com/apache/incubator-singa.git - -# config ssh service -RUN mkdir /var/run/sshd -RUN echo 'root:singa' | chpasswd -RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config -# SSH login fix. Otherwise user is kicked off after login -RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd - -# dump environment variables into files, so that ssh can see also -RUN env | grep _ >> /etc/environment - -EXPOSE 22 - -CMD ["/usr/sbin/sshd", "-D"] http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/a3f34cb0/tool/jenkins/docker/ubuntu16.04/runtime/Dockerfile ---------------------------------------------------------------------- diff --git a/tool/jenkins/docker/ubuntu16.04/runtime/Dockerfile b/tool/jenkins/docker/ubuntu16.04/runtime/Dockerfile deleted file mode 100644 index 089d10f..0000000 --- a/tool/jenkins/docker/ubuntu16.04/runtime/Dockerfile +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env sh -# -# 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. -# -# Base unbuntu 16.04 image -FROM ubuntu:latest - -MAINTAINER incubator-singa [email protected] - -# install dependencies -RUN apt-get update \ - && apt-get install -y --no-install-recommends subversion git python-dev python-pip python-sphinx openssh-server\ - && apt-get clean && apt-get autoremove && apt-get autoclean \ - && rm -rf /var/lib/apt/lists/* \ - && pip --no-cache-dir install -U pip setuptools \ - && pip --no-cache-dir install recommonmark - -RUN mkdir /var/run/sshd -RUN echo 'root:singa' | chpasswd -RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config -# SSH login fix. Otherwise user is kicked off after login -RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd - -# dump environment variables into files, so that ssh can see also -# RUN env | grep _ >> /etc/environment - -EXPOSE 22 - -CMD ["/usr/sbin/sshd", "-D"]
