From 579586a5f6c11675f82e5506129ede0d75d7a26c Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Tue, 16 Nov 2021 17:01:39 -0600 Subject: [PATCH] Add building (not running yet) Dockerfile Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com> --- Dockerfile | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..52f74a0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,115 @@ +FROM alpine:3.14.3 + +ARG NANOSIM_VERSION=3.0.2 +ARG MINIMAP2_VERSION=2.18 +ARG LAST_VERSION=916 +ARG LAST_SHA="98fc3d382ef443b4468b633d2fe90ac3d0b3c21e" +ARG SAMTOOLS_VERSION=1.12 +ARG GENOMETOOLS_VERSION=1.6.2 + +RUN \ + # Install real dependencies + apk add --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ + --update --no-cache \ + bash \ + libbz2 \ + ncurses \ + py3-pip \ + python3 \ + xz \ + zlib && \ +\ + # Install build dependencies + apk add --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ + --no-cache --virtual .build-deps \ + blas-dev \ + build-base \ + bzip2-dev \ + freetype-dev \ + g++ \ + gcc \ + gfortran \ + git \ + lapack-dev \ + libgfortran \ + libpng-dev \ + make \ + musl-dev \ + ncurses-dev \ + openblas-dev \ + py-pip \ + python3-dev \ + wget \ + xz-dev \ + zlib-dev &&\ +\ + # Make python3 the default + ln -fs /usr/include/locale.h /usr/include/xlocale.h && \ + ln -fs /usr/bin/python3 /usr/local/bin/python && \ + ln -fs /usr/bin/pip3 /usr/local/bin/pip && \ +\ + # Download and install Minimap2 + cd /tmp && \ + wget -qO- https://github.com/lh3/minimap2/releases/download/v${MINIMAP2_VERSION}/minimap2-${MINIMAP2_VERSION}.tar.bz2 | tar xjv && \ + cd minimap2-${MINIMAP2_VERSION} && \ + make && \ + cp minimap2 /usr/bin && \ + mkdir /usr/man && \ + cp minimap2.1 /usr/man && \ + cd .. && \ + rm -rf minimap2-${MINIMAP2_VERSION} && \ + cd && \ +\ + # Download and install LAST + cd /tmp && \ + git clone https://gitlab.com/mcfrith/last.git && \ + cd last && \ + git checkout ${LAST_SHA} && \ + make && make install && \ + cd .. && \ + rm -rf last && \ + cd && \ +\ + # Download and install samtools + cd /tmp && \ + wget https://github.com/samtools/samtools/releases/download/$SAMTOOLS_VERSION/samtools-$SAMTOOLS_VERSION.tar.bz2 && \ + tar xjvf samtools-$SAMTOOLS_VERSION.tar.bz2 && \ + cd samtools-$SAMTOOLS_VERSION && \ + ./configure && \ + make && make install && \ + cd .. && \ + rm -rf samtools-$SAMTOOLS_VERSION* && \ + cd && \ +\ + # Download and install GenomeTools + cd /tmp && \ + wget -qO- https://github.com/genometools/genometools/archive/refs/tags/v${GENOMETOOLS_VERSION}.tar.gz | tar xzv && \ + cd genometools-${GENOMETOOLS_VERSION} && \ + make cairo=no errorcheck=no && make cairo=no errorcheck=no install && \ + cd .. && \ + rm -rf v${GENOMETOOLS_VERSION} && \ + cd && \ +\ + # Download and install Python packages + pip3 install -v --no-cache-dir six==1.16.0 && \ + pip3 install -v --no-cache-dir joblib==0.14.1 && \ + pip3 install -v --no-cache-dir threadpoolctl && \ + pip3 install -v --no-cache-dir numpy==1.17.2 && \ + pip3 install -v --no-cache-dir scipy && \ + pip3 install -v --no-cache-dir cython && \ + pip3 install -v --no-cache-dir scikit-learn==0.21.3 && \ + pip3 install -v --no-cache-dir pysam==0.17 && \ + pip3 install -v --no-cache-dir HTSeq==0.11.2 && \ + pip3 install -v --no-cache-dir pybedtools==0.8.2 && \ +\ + # Download and install NanoSim + cd /tmp && \ + wget -qO- https://github.com/bcgsc/NanoSim/archive/refs/tags/v${NANOSIM_VERSION}.tar.gz | tar xzv && \ + cd NanoSim-${NANOSIM_VERSION} && \ + cp -r src/* /usr/bin && \ + cd .. && \ + rm -rf NanoSim-${NANOSIM_VERSION} && \ + cd .. && \ +\ + # Cleanup build packages + apk del --no-cache .build-deps