-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
executable file
·59 lines (51 loc) · 1.87 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# backend: base | pytorch | pznet
ARG BACKEND=pytorch
FROM seunglab/chunkflow:${BACKEND}
#FROM seunglab/pznet:latest
target maintainer = "Jingpeng Wu" \
email = "jingpeng@princeton.edu"
RUN mkdir -p $HOME/workspace/chunkflow
# WORKDIR only works with ENV
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
ENV HOME /root
WORKDIR $HOME/workspace/chunkflow
COPY . .
RUN apt-get update && apt-get install -y -qq --no-install-recommends \
apt-utils \
wget \
git \
build-essential \
parallel \
# test whether pip is working
# there is an issue of pip:
# https://github.com/laradock/laradock/issues/1496
# we need this hash to solve this issue
# && ln -sf /usr/bin/pip3 /usr/bin/pip \
# this do not work due to an issue in pip3
# https://github.com/pypa/pip/issues/5240
&& pip install -U pip \
&& hash -r pip \
&& pip install --upgrade setuptools \
&& pip install numpy setuptools cython --no-cache-dir \
&& pip install -U protobuf scipy brotlipy --no-cache-dir \
# && pip install fpzip --no-binary :all: --no-cache-dir \
# setup environment variables
# we have to setup first, otherwise click installation will fail
&& echo "export LC_ALL=C.UTF-8" >> $HOME/.bashrc \
&& echo "export LANG=C.UTF-8" >> $HOME/.bashrc \
&& echo "export PYTHONPATH=$HOME/workspace/chunkflow:\$PYTHONPATH" >> $HOME/.bashrc \
&& pip install -r requirements.txt --no-cache-dir \
&& pip install -r tests/requirements.txt --no-cache-dir \
# install the commandline chunkflow
&& pip install -e . \
# cleanup system libraries
&& apt-get remove --purge -y \
build-essential \
&& apt-get clean \
&& apt-get autoremove --purge -y \
&& rm -rf /var/lib/apt/lists/* \
# the test will not pass due to missing of credentials.
# && pytest tests \
&& chunkflow
WORKDIR $HOME/workspace/chunkflow/