-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile.gpu
53 lines (47 loc) · 1.58 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
FROM nvidia/cuda:9.0-base-ubuntu16.04
ARG DEBIAN_FRONTEND="noninteractive"
ENV LANG="C.UTF-8" \
LC_ALL="C.UTF-8"
# Install GPU dependencies for TensorFlow.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
nvinfer-runtime-trt-repo-ubuntu1604-4.0.1-ga-cuda9.0 \
&& apt-get update \
&& apt-get install -y --no-install-recommends --allow-unauthenticated \
libnvinfer4=4.1.2-1+cuda9.0 \
cuda-cublas-9-0 \
cuda-cufft-9-0 \
cuda-curand-9-0 \
cuda-cusolver-9-0 \
cuda-cusparse-9-0 \
libcudnn7=7.2.1.38-1+cuda9.0 \
libnccl2=2.2.13-1+cuda9.0 \
libfreetype6-dev \
libhdf5-serial-dev \
libpng12-dev \
libzmq3-dev \
pkg-config \
unzip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update \
&& apt-get install --yes --quiet --no-install-recommends \
ca-certificates \
curl \
git \
libgomp1 \
python3 \
&& rm -rf /var/lib/apt/lists/* \
&& curl -fsSL https://bootstrap.pypa.io/pip/3.5/get-pip.py | python3 - \
&& ln -s $(which python3) /usr/local/bin/python
WORKDIR /opt/kwyk
COPY [".", "."]
RUN pip install --no-cache-dir --editable .[gpu] \
# Install the saved models.
&& curl -fsSL https://github.com/patrick-mcclure/nobrainer/tarball/master \
| tar xz --strip=1 --wildcards '*/saved_models'
ENV FREESURFER_HOME="/opt/kwyk/freesurfer"
ENV PATH="$FREESURFER_HOME/bin:$PATH"
WORKDIR /data
ENTRYPOINT ["kwyk"]
LABEL maintainer="Jakub Kaczmarzyk <[email protected]>"