-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile.drivers
More file actions
118 lines (102 loc) · 3.53 KB
/
Dockerfile.drivers
File metadata and controls
118 lines (102 loc) · 3.53 KB
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
107
108
109
110
111
112
113
114
115
116
117
118
#
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
#
ARG FROM_IMAGE=gpuci/miniconda-cuda-driver
ARG CUDA_VER=10.1
ARG LINUX_VERSION=ubuntu16.04
ARG IMAGE_TYPE=devel
FROM ${FROM_IMAGE}:${CUDA_VER}-${IMAGE_TYPE}-${LINUX_VERSION}
ARG CC_VERSION=5
ARG PYTHON_VERSION=3.7
# Capture argument used for FROM
ARG CUDA_VER
# Update environment for gcc/g++ builds
ENV CC=/usr/bin/gcc
ENV CXX=/usr/bin/g++
ENV CUDAHOSTCXX=/usr/bin/g++
ENV CUDA_HOME=/usr/local/cuda
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/local/lib
# Enables "source activate conda"
SHELL ["/bin/bash", "-c"]
RUN apt update && \
apt-get -y install vim \
# Install gcc version
g++-${CC_VERSION} \
gcc-${CC_VERSION} \
cmake \
make \
# Install the packages needed to build with.
# Install htslib dependencies
wget \
tabix \
zlib1g-dev \
libbz2-dev \
liblzma-dev \
libcurl4-gnutls-dev \
# VariantWorks `cyvcf2` dependency
libssl-dev \
# samtools dependencies
libncurses5-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${CC_VERSION} 1000 --slave /usr/bin/g++ g++ /usr/bin/g++-${CC_VERSION}
# Add a condarc for channels and override settings
# RUN echo -e "\
# ssl_verify: False \n\
# channels: \n\
# - gpuci \n\
# - conda-forge \n\
# - nvidia \n\
# - defaults \n" > /conda/.condarc \
# && cat /conda/.condarc ;
RUN echo -e "\
ssl_verify: False \n\
channels: \n\
- defaults \n" > /conda/.condarc \
&& cat /conda/.condarc ;
# Create parabricks conda env and make default
RUN source activate base \
# && conda update conda \
# && conda install -y -c gpuci gpuci-tools \
&& conda create --override-channels -c conda-forge -n parabricks python=${PYTHON_VERSION} \
&& source activate parabricks \
&& conda install -c conda-forge autoconf \
&& conda install -c nvidia cudatoolkit=${CUDA_VER} \
&& conda install -c conda-forge git \
&& conda install -c conda-forge rsync \
&& conda install -c conda-forge "setuptools<50" \
# && conda create --no-default-packages --override-channels -n parabricks \
# -c nvidia \
# -c conda-forge \
# -c defaults \
# # -c gpuci \
# -c bioconda \
# autoconf \
# cudatoolkit=${CUDA_VER} \
# git \
# # gpuci-tools \
# # htslib \
# python=${PYTHON_VERSION} \
# rsync \
# setuptools \
&& sed -i 's/conda activate base/conda activate parabricks/g' ~/.bashrc ;
# Install samtools
RUN wget https://github.com/samtools/samtools/releases/download/1.12/samtools-1.12.tar.bz2 && \
tar -xf samtools-1.12.tar.bz2 && \
cd samtools-1.12 && \
./configure && make && make install
# Install htslib
RUN wget https://github.com/samtools/htslib/releases/download/1.12/htslib-1.12.tar.bz2 && tar -xf htslib-1.12.tar.bz2 &&cd htslib-1.12 && make && make install
# ADD source dest
# Create symlink for old scripts expecting `gdf` conda env
RUN ln -s /opt/conda/envs/parabricks /opt/conda/envs/gdf
# Clean up pkgs to reduce image size
RUN conda clean -afy && chmod -R ugo+w /opt/conda
ENTRYPOINT [ "/usr/bin/tini", "--" ]
CMD [ "/bin/bash" ]