Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ __pycache__
._*

slurm-*.out
.idea/*
43 changes: 11 additions & 32 deletions Dockerfile.gpu
Original file line number Diff line number Diff line change
@@ -1,53 +1,32 @@
FROM nvidia/cuda:9.0-base-ubuntu16.04
ARG DEBIAN_FRONTEND="noninteractive"
FROM tensorflow/tensorflow:1.12.3-gpu-py3
ENV LANG="C.UTF-8" \
LC_ALL="C.UTF-8"

# Install GPU dependencies for TensorFlow.
# remove old nvidia keys and install new signing keys
RUN rm /etc/apt/sources.list.d/cuda.list
RUN rm /etc/apt/sources.list.d/nvidia-ml.list
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 \
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/*
&& apt-key del 7fa2af80 \
&& apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/3bf863cc.pub \
&& apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/7fa2af80.pub

RUN apt-get update \
&& apt-get install --yes --quiet --no-install-recommends \
ca-certificates \
curl \
git \
libgomp1 \
python3 \
wget \
&& 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
&& curl -fsSL https://bootstrap.pypa.io/pip/3.5/get-pip.py | python3 -

WORKDIR /opt/kwyk
COPY [".", "."]
RUN pip install --no-cache-dir --editable .[gpu] \
RUN python3 -m 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]>"

4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ console_scripts =
kwyk = kwyk.cli:predict

[options.extras_require]
cpu = tensorflow == 1.12.3
gpu = tensorflow-gpu == 1.12.3
cpu = tensorflow >= 1.12.0
gpu = tensorflow-gpu >= 1.12.0

[versioneer]
VCS = git
Expand Down