-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.gpu
56 lines (39 loc) · 1.61 KB
/
Dockerfile.gpu
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
FROM continuumio/conda-ci-linux-64-python3.8:latest as base
ARG BRAINY_COMMITISH="19e69299"
USER root
RUN apt-get update \
&& apt-get install --yes --quiet --no-install-recommends \
ca-certificates \
git \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*
RUN conda install -c conda-forge --yes git-annex && conda clean --all
RUN pip install --quiet --no-cache-dir datalad datalad-osf
WORKDIR /opt/neuronets/trained-models
ENV BRAINY_MODEL_FILE="/opt/neuronets/trained-models/neuronets/brainy/0.1.0/brain-extraction-unet-128iso-model.h5"
RUN datalad clone https://github.com/neuronets/trained-models.git . \
&& git config user.name "brainy" \
&& git config user.email "brainy" \
&& datalad get -s osf-storage "$BRAINY_MODEL_FILE" \
&& git checkout "$BRAINY_COMMITISH"
FROM tensorflow/tensorflow:2.3.1-gpu
ARG DEBIAN_FRONTEND="noninteractive"
COPY --from=base /opt/neuronets/trained-models /opt/neuronets/trained-models
ENV LANG="C.UTF-8" \
LC_ALL="C.UTF-8"
RUN apt-get update \
&& apt-get install --yes --quiet --no-install-recommends \
ca-certificates \
git \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /opt/neuronets/brainy
COPY . .
ENV BRAINY_MODEL_FILE="/opt/neuronets/trained-models/neuronets/brainy/0.1.0/brain-extraction-unet-128iso-model.h5"
# Only difference between this and cpu Dockerfile is this line.
RUN pip install --no-cache-dir --editable .
ENV FREESURFER_HOME="/opt/neuronets/brainy/freesurfer"
ENV PATH="$FREESURFER_HOME/bin:$PATH"
WORKDIR /data
ENTRYPOINT ["brainy"]
LABEL maintainer="Hoda Rajaei <rajaei.hoda@gmail.com>"