Skip to content
Snippets Groups Projects
Commit cd45794b authored by calrama's avatar calrama
Browse files

ubuntu18.04: Split into multiple docker images

parent 5b5ccb4a
Branches
Tags
No related merge requests found
...@@ -12,8 +12,14 @@ build ubuntu-18.04: ...@@ -12,8 +12,14 @@ build ubuntu-18.04:
- CACHE_FILE="/var/lib/gitlab-runner/.local/share/robofish-docker-gpu-driver-version" - CACHE_FILE="/var/lib/gitlab-runner/.local/share/robofish-docker-gpu-driver-version"
- if [[ -f $CACHE_FILE ]] && [[ "$(cat $CACHE_FILE)" == "$GPU_DRIVER_VERSION" ]]; then OPTS=''; else OPTS='--no-cache'; fi - if [[ -f $CACHE_FILE ]] && [[ "$(cat $CACHE_FILE)" == "$GPU_DRIVER_VERSION" ]]; then OPTS=''; else OPTS='--no-cache'; fi
- echo -n $GPU_DRIVER_VERSION > $CACHE_FILE - echo -n $GPU_DRIVER_VERSION > $CACHE_FILE
- docker build $OPTS --pull -t "${CI_REGISTRY}/${CI_PROJECT_PATH,,}:base-ubuntu18.04" -f ubuntu18.04/base/Dockerfile ubuntu18.04/base
- docker push "${CI_REGISTRY}/${CI_PROJECT_PATH,,}:base-ubuntu18.04"
- docker build $OPTS --pull -t "${CI_REGISTRY}/${CI_PROJECT_PATH,,}:devel-ubuntu18.04" -f ubuntu18.04/devel/Dockerfile ubuntu18.04
- docker push "${CI_REGISTRY}/${CI_PROJECT_PATH,,}:devel-ubuntu18.04"
- docker build $OPTS --pull -t "${CI_REGISTRY}/${CI_PROJECT_PATH,,}:cuda-devel-ubuntu18.04" -f ubuntu18.04/cuda-devel/Dockerfile ubuntu18.04 - docker build $OPTS --pull -t "${CI_REGISTRY}/${CI_PROJECT_PATH,,}:cuda-devel-ubuntu18.04" -f ubuntu18.04/cuda-devel/Dockerfile ubuntu18.04
- docker push "${CI_REGISTRY}/${CI_PROJECT_PATH,,}:cuda-devel-ubuntu18.04" - docker push "${CI_REGISTRY}/${CI_PROJECT_PATH,,}:cuda-devel-ubuntu18.04"
- docker build $OPTS --pull -t "${CI_REGISTRY}/${CI_PROJECT_PATH,,}:jupyter-ubuntu18.04" -f ubuntu18.04/jupyter/Dockerfile ubuntu18.04/jupyter
- docker push "${CI_REGISTRY}/${CI_PROJECT_PATH,,}:jupyter-ubuntu18.04"
after_script: after_script:
- docker logout "${CI_REGISTRY}" - docker logout "${CI_REGISTRY}"
......
FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04
LABEL maintainer="Moritz Maxeiner <moritz.maxeiner@fu-berlin.de>"
LABEL authors="Moritz Maxeiner <moritz.maxeiner@fu-berlin.de>"
ENV TZ=Europe/Berlin
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends software-properties-common && \
add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
apt-get update
RUN apt-get install -y locales && \
locale-gen en_US.UTF-8 && \
echo $TZ > /etc/timezone && \
apt-get install -y tzdata && \
rm /etc/localtime && \
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
dpkg-reconfigure -f noninteractive tzdata
RUN apt-get install -y --no-install-recommends \
build-essential \
pkg-config \
gcc-8 g++-8 \
ninja-build \
curl \
git \
p7zip-full \
file
RUN apt-get install -y \
libgfortran3 \
protobuf-compiler \
graphviz \
qt5-default \
qtbase5-dev \
qtmultimedia5-dev \
libqt5charts5-dev \
libboost-all-dev \
libopenblas-dev \
liblapack-dev \
libcurl4-openssl-dev \
libzmq3-dev \
libprotobuf-dev \
libepoxy-dev \
libglm-dev \
libegl1-mesa-dev \
libcgal-dev \
libcgal-qt5-dev \
libjsoncpp-dev \
libwebsocketpp-dev
RUN apt-get install -y \
python3 \
python3-dev \
python3-pip \
python3-setuptools \
python3-distutils
RUN python3.6 -m pip --no-cache-dir install \
graphviz \
opencv-python \
nose \
nose-timer \
pylint \
requests \
Pillow \
wheel \
twine \
h5py \
joblib \
psutil
RUN cd /tmp && \
curl -sSLO https://cmake.org/files/v3.13/cmake-3.13.1.tar.gz && \
tar -xf cmake-3.13.1.tar.gz && \
cd cmake-3.13.1 && \
./configure --prefix=/usr/local && \
make install -j$(nproc --all) && \
cd .. && \
rm -rf cmake-3.13.1*
COPY hdf5-1.10.2-no-trailing-attributes.patch /tmp
RUN cd /tmp && \
curl -sSLO https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.2/src/hdf5-1.10.2.tar.bz2 && \
tar -xf hdf5-1.10.2.tar.bz2 && \
cd hdf5-1.10.2 && \
patch -p1 -i /tmp/hdf5-1.10.2-no-trailing-attributes.patch && \
cmake -Bbuild -H. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -G Ninja && \
ninja -C build install && \
cd .. && \
rm -rf hdf5-1.10.2*
RUN cd /tmp && \
curl -sSLO https://github.com/pybind/pybind11/archive/v2.2.4.tar.gz && \
tar -xf v2.2.4.tar.gz && \
cd pybind11-2.2.4 && \
cmake -Bbuild -H. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DPYBIND11_TEST=off -G Ninja && \
ninja -C build install && \
cd .. && \
rm -f v2.2.4.tar.gz && \
rm -rf pybind11-2.2.4
ADD agki-nas01.imp.fu-berlin.de-ca-cert.crt /usr/local/share/ca-certificates/agki-nas01.imp.fu-berlin.de-ca-cert.crt
RUN update-ca-certificates
RUN apt-get clean
FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04 FROM git.imp.fu-berlin.de:5000/bioroboticslab/robofish/docker:base-ubuntu18.04
LABEL maintainer="Moritz Maxeiner <moritz.maxeiner@fu-berlin.de>"
LABEL authors="Moritz Maxeiner <moritz.maxeiner@fu-berlin.de>"
ENV TZ=Europe/Berlin
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y --no-install-recommends \ apt-get install -y libopencv-dev \
software-properties-common cd /opt && \
RUN add-apt-repository ppa:ubuntu-toolchain-r/test -y
RUN apt-get update
RUN echo $TZ > /etc/timezone && \
apt-get install -y tzdata && \
rm /etc/localtime && \
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
dpkg-reconfigure -f noninteractive tzdata
RUN apt-get install -y --no-install-recommends \
build-essential \
pkg-config \
gcc-8 g++-8 \
ninja-build \
curl \
git \
libboost-all-dev
RUN apt-get install -y \
python3 \
python3-dev \
python3-pip \
python3-setuptools \
python3-distutils
RUN cd /tmp && \
curl -sSLO https://cmake.org/files/v3.13/cmake-3.13.1.tar.gz && \
tar -xf cmake-3.13.1.tar.gz && \
cd cmake-3.13.1 && \
./configure --prefix=/usr/local && \
make install -j$(nproc --all) && \
cd .. && \
rm -rf cmake-3.13.1*
RUN apt-get install -y \
libopenblas-dev \
liblapack-dev \
libopencv-dev \
libcurl4-openssl-dev \
libzmq3-dev \
libprotobuf-dev \
protobuf-compiler \
python-opencv \
libgfortran3 \
graphviz
RUN python3.6 -m pip --no-cache-dir install \
graphviz \
nose \
nose-timer \
pylint \
requests \
Pillow \
wheel \
twine \
h5py \
joblib \
psutil
RUN cd /opt && \
curl -sSLO https://github.com/apache/incubator-mxnet/releases/download/1.3.1/apache-mxnet-src-1.3.1.rc0-incubating.tar.gz && \ curl -sSLO https://github.com/apache/incubator-mxnet/releases/download/1.3.1/apache-mxnet-src-1.3.1.rc0-incubating.tar.gz && \
tar -xf apache-mxnet-src-1.3.1.rc0-incubating.tar.gz --owner root --group root --no-same-owner && \ tar -xf apache-mxnet-src-1.3.1.rc0-incubating.tar.gz --owner root --group root --no-same-owner && \
rm -f apache-mxnet-src-1.3.1.rc0-incubating.tar.gz && \ rm -f apache-mxnet-src-1.3.1.rc0-incubating.tar.gz && \
...@@ -92,76 +24,6 @@ RUN cd /opt && \ ...@@ -92,76 +24,6 @@ RUN cd /opt && \
-G Ninja && \ -G Ninja && \
ninja -C build && \ ninja -C build && \
cd python && \ cd python && \
python3 setup.py install python3 setup.py install && \
apt-get clean
COPY hdf5-1.10.2-no-trailing-attributes.patch /tmp
RUN cd /tmp && \
curl -sSLO https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.2/src/hdf5-1.10.2.tar.bz2 && \
tar -xf hdf5-1.10.2.tar.bz2 && \
cd hdf5-1.10.2 && \
patch -p1 -i /tmp/hdf5-1.10.2-no-trailing-attributes.patch && \
cmake -Bbuild -H. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -G Ninja && \
ninja -C build install && \
cd .. && \
rm -rf hdf5-1.10.2*
RUN cd /tmp && \
curl -sSLO https://github.com/pybind/pybind11/archive/v2.2.4.tar.gz && \
tar -xf v2.2.4.tar.gz && \
cd pybind11-2.2.4 && \
cmake -Bbuild -H. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DPYBIND11_TEST=off -G Ninja && \
ninja -C build install && \
cd .. && \
rm -f v2.2.4.tar.gz && \
rm -rf pybind11-2.2.4
RUN apt-get install -y \
qt5-default \
qtbase5-dev \
qtmultimedia5-dev \
libqt5charts5-dev \
libepoxy-dev \
libglm-dev \
libegl1-mesa-dev \
libcgal-dev \
libcgal-qt5-dev \
libjsoncpp-dev \
libwebsocketpp-dev
RUN python3.6 -m pip --no-cache-dir install \
numpy \
scipy \
matplotlib \
pandas \
jupyterlab
RUN apt-get install -y openssh-server && \
mkdir -p /var/run/sshd && \
mkdir /root/.ssh && \
chmod 700 /root/.ssh && \
touch /root/.ssh/authorized_keys
RUN apt-get install -y locales && \
locale-gen en_US.UTF-8 en_GB.UTF-8
RUN apt-get install -y \
file \
p7zip-full
COPY jupyter_notebook_config.py /root/.jupyter/
ADD mxnet_profile.sh /etc/profile.d/mxnet.sh ADD mxnet_profile.sh /etc/profile.d/mxnet.sh
COPY launch.sh /sbin
COPY sshd_config /etc/ssh/sshd_config
ADD agki-nas01.imp.fu-berlin.de-ca-cert.crt /usr/local/share/ca-certificates/agki-nas01.imp.fu-berlin.de-ca-cert.crt
RUN update-ca-certificates
RUN apt-get clean
WORKDIR "/root"
ENTRYPOINT [ "/sbin/launch.sh" ]
CMD [ "sshd" ]
EXPOSE 22
EXPOSE 8080
FROM git.imp.fu-berlin.de:5000/bioroboticslab/robofish/docker:base-ubuntu18.04
RUN apt-get update && \
apt-get install -y libopencv-dev \
cd /opt && \
curl -sSLO https://github.com/apache/incubator-mxnet/releases/download/1.3.1/apache-mxnet-src-1.3.1.rc0-incubating.tar.gz && \
tar -xf apache-mxnet-src-1.3.1.rc0-incubating.tar.gz --owner root --group root --no-same-owner && \
rm -f apache-mxnet-src-1.3.1.rc0-incubating.tar.gz && \
mv apache-mxnet-src-1.3.1.rc0-incubating mxnet-1.3.1 && \
cd mxnet-1.3.1 && \
cmake -Bbuild -H. \
-DCMAKE_CXX_STANDARD=14 -DUSE_CXX14_IF_AVAILABLE=ON \
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local \
-DUSE_CUDA=OFF -DUSE_CUDNN=OFF -DUSE_NCCL=OFF \
-DUSE_OPENCV=ON -DUSE_OPENMP=ON \
-DUSE_LAPACK=ON -DUSE_MKL_IF_AVAILABLE=OFF \
-DUSE_DIST_KVSTORE=ON \
-DUSE_CPP_PACKAGE=ON \
-DUSE_SIGNAL_HANDLER=ON \
-DENABLE_CUDA_RTC=OFF \
-DBUILD_CPP_EXAMPLES=OFF \
-DUSE_GPERFTOOLS=OFF \
-DUSE_JEMALLOC=OFF \
-G Ninja && \
ninja -C build && \
cd python && \
python3 setup.py install && \
apt-get clean
ADD mxnet_profile.sh /etc/profile.d/mxnet.sh
FROM git.imp.fu-berlin.de:5000/bioroboticslab/robofish/docker:cuda-devel-ubuntu18.04
RUN python3.6 -m pip --no-cache-dir install \
numpy \
scipy \
matplotlib \
pandas \
jupyterlab
RUN apt-get update && \
apt-get install -y openssh-server && \
mkdir -p /var/run/sshd && \
mkdir /root/.ssh && \
chmod 700 /root/.ssh && \
touch /root/.ssh/authorized_keys && \
apt-get clean
COPY jupyter_notebook_config.py /root/.jupyter/
COPY launch.sh /sbin
COPY sshd_config /etc/ssh/sshd_config
WORKDIR "/root"
ENTRYPOINT [ "/sbin/launch.sh" ]
CMD [ "sshd" ]
EXPOSE 22
EXPOSE 8080
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment