forked from fragalassi/Docker_music_v2_v3.2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
106 lines (86 loc) · 3.08 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
FROM ubuntu:18.04 as builder
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
RUN set -ex \
&& apt update \
&& apt install -y --no-install-recommends --no-install-suggests \
build-essential \
cmake \
git \
ssh-client \
curl \
ca-certificates \
libglu1-mesa-dev freeglut3-dev mesa-common-dev \
libhdf5-dev \
libhdf5-mpi-dev \
ninja-build \
&& rm -rf /var/lib/apt/lists/*
# Copy SSH key for git private repos
# Need to have a private key wih no passphrase
ADD .ssh/id_rsa /root/.ssh/id_rsa
ADD .ssh/id_rsa.pub /root/.ssh/id_rsa.pub
RUN chmod 600 /root/.ssh/id_rsa*
RUN ssh-keyscan -t rsa github.com > /root/.ssh/known_hosts
## Anima
WORKDIR /music
RUN set -ex \
&& git clone --depth 1 -b music-v3.1 [email protected]:Inria-Visages/Anima-Public.git \
&& cd Anima-Public && mkdir build && cd build && cmake \
-G Ninja \
-DUSE_ANIMA_PRIVATE=ON \
.. && ninja -j $(nproc)
#RUN cd Anima-Public/build/Boost && ninja -j $(nproc) install
RUN cd Anima-Public/build/NLOPT && ninja -j $(nproc) install
RUN cd Anima-Public/build/VTK && ninja -j $(nproc) install
RUN cd Anima-Public/build/ITK && ninja -j $(nproc) install
RUN cd Anima-Public/build/RPI && ninja -j $(nproc) install
#RUN cd Anima-Public/build/TCLAP && ninja -j $(nproc) install
RUN cd Anima-Public/build/TinyXML2 && ninja -j $(nproc) install
#FROM nvidia/cuda:9.1-cudnn7-devel-ubuntu16.04
FROM tensorflow/tensorflow:latest-gpu
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
RUN set -ex \
&& apt update \
&& apt install -y --no-install-recommends --no-install-suggests \
git \
ssh-client \
ca-certificates \
unzip \
python3 python3-distutils \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install git lfs
RUN set -ex \
&& curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh -o script-deb.sh \
&& bash script-deb.sh \
&& apt install git-lfs \
&& git lfs install
# Copy SSH key for git private repos
# Need to have a private key wih no passphrase
ADD .ssh/id_rsa /root/.ssh/id_rsa
ADD .ssh/id_rsa.pub /root/.ssh/id_rsa.pub
RUN chmod 600 /root/.ssh/id_rsa*
RUN ssh-keyscan -t rsa github.com > /root/.ssh/known_hosts
WORKDIR /music
## Copy build artifacts in current image
COPY --from=builder /usr/local/lib /usr/local/lib
COPY --from=builder /usr/local/bin /usr/local/bin
RUN mkdir anima
COPY --from=builder /music/Anima-Public/build/bin /music/anima
COPY --from=builder /music/Anima-Public/build/lib /usr/local/lib
RUN ldconfig
## Retrieve Anima-Scripts-Public
RUN set -ex \
&& git clone --depth 1 -b music-v3.1 [email protected]:Inria-Visages/Anima-Scripts-Public.git
## Retrieve Anima-Scripts
RUN set -ex \
&& git clone --depth 1 -b music-v3.1 [email protected]:Inria-Visages/Anima-Scripts.git
## Retrieve Anima-Scripts-Data-Public
RUN set -ex \
&& git clone --recursive -b music-v3.1 [email protected]:Inria-Visages/Anima-Scripts-Data-Public.git
COPY config.txt /root/.anima/
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
RUN python3 get-pip.py
RUN pip3 install theano nibabel keras tensorflow-gpu
RUN rm -rf /root/.ssh/