Skip to content

Commit

Permalink
shrink docker image based on nico's update
Browse files Browse the repository at this point in the history
  • Loading branch information
xiuliren committed Jan 17, 2019
1 parent dd37b8c commit 70d1b5d
Showing 1 changed file with 33 additions and 36 deletions.
69 changes: 33 additions & 36 deletions docker/chunkflow/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,47 +1,44 @@
FROM seunglab/chunkflow:latest
MAINTAINER Jingpeng Wu
# This image contains private keys, make sure the image is not pushed to docker hub or any public repo.

## INSTALL gsutil
# Prepare the image.
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y -qq --no-install-recommends \
apt-utils \
# software-properties-common \
curl \
git \
openssh-client \
# python-h5py \
libboost-all-dev \
# libhdf5-dev \
# liblzma-dev \
# libgmp-dev \
# libmpfr-dev \
# libxml2-dev \
# unzip \
# vim \
git \
wget \
zlib1g-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# we can only use numpy==1.15 due to an issue of skimage:
# https://github.com/scikit-image/scikit-image/issues/3551
# the fix was not released yet.
# https://github.com/scikit-image/scikit-image/pull/3556
RUN pip install pip setuptools pyasn1 -U --no-cache-dir \
&& pip install Cython wheel numpy==1.15 --no-cache-dir

# install igneous
WORKDIR /
RUN git clone --depth 1 --single-branch -b chunkflow https://github.com/seung-lab/igneous.git

RUN mkdir /.ssh \
&& git clone --depth 1 --single-branch -b chunkflow https://github.com/seung-lab/igneous.git \
&& pip install -r /igneous/requirements.txt --no-cache-dir

WORKDIR /igneous
RUN pip install intern -U --no-cache-dir \
&& pip install -e . --no-cache-dir
RUN apt-get update \
# Build dependencies
&& apt-get install -y -qq --no-install-recommends \
git \
libboost-dev \
build-essential \
# igneous + runtime dependencies
&& cd igneous \
&& pip install --no-cache-dir -r requirements.txt \
# we can only use numpy==1.15 due to an issue of skimage:
# https://github.com/scikit-image/scikit-image/issues/3551
# the fix was not released yet.
# https://github.com/scikit-image/scikit-image/pull/3556
&& pip install numpy==1.15 --no-cache-dir \
&& pip install --no-cache-dir -e . \
\
# Cleanup build dependencies
&& apt-get remove --purge -y \
libboost-dev \
build-essential \
&& apt-get autoremove --purge -y \
# Cleanup apt
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
# Cleanup temporary python files
&& find /usr/local/lib/python3.6 -depth \
\( \
\( -type d -a \( -name __pycache__ \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
\) -exec rm -rf '{}' +

RUN apt-get remove -y libboost-dev
#CMD python /igneous/igneous/task_execution.py

0 comments on commit 70d1b5d

Please sign in to comment.