-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
60 lines (49 loc) · 1.62 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
60
FROM ubuntu:latest
ARG watson
ARG UID
ARG GID
ARG watson
RUN if [ -z "$watson" ] ; then echo "Will build without Watson support. Set --build-arg watson=true for watson support" ; else echo "Build with watson support" ; fi
RUN mkdir /bonndit
WORKDIR /bonndit
ENV RDBASE=/bonndit
WORKDIR $RDBASE
RUN apt-get update
RUN apt install build-essential cmake libcerf-dev wget python3 python3-pip -y
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir scipy cython pandas dipy cvxopt mpmath psutil pynrrd plyfile
RUN if [ -z "$watson" ] ; then \
apt-get install git libgoogle-glog-dev libgflags-dev libatlas-base-dev libeigen3-dev libfftw3-dev libsuitesparse-dev liblapacke-dev -y && \
wget http://ceres-solver.org/ceres-solver-2.1.0.tar.gz && \
tar zxf ceres-solver-2.1.0.tar.gz && \
mkdir ceres-bin && \
cd ceres-bin && \
cmake ../ceres-solver-2.1.0 && \
make -j16 && \
make install; \
else \
apt-get install git libatlas-base-dev liblapacke-dev -y; \
fi
RUN git clone --depth 1 https://github.com/MedVisBonn/bonndit.git --branch new-dev && \
echo $(ls) && \
mv ./bonndit/* ./ && \
rm -rf bonndit
RUN if [ -z "$watson" ]; then \
rm -rf build && \
mkdir build && \
cd build && \
cmake .. && \
make install; \
fi
RUN mkdir /data
RUN groupadd -rg $GID bonndit && useradd -ru $UID -g bonndit -d /data tracktograph && \
chown tracktograph:bonndit /data
RUN if [ -z "$watson" ]; then \
WATSON=TRUE pip install .; \
else \
pip install .; \
fi
RUN rm -rf /bonndit
WORKDIR /data
SHELL ["/bin/bash", "-c", "-l"]
USER tracktograph