-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDockerfile
More file actions
66 lines (56 loc) · 2.55 KB
/
Dockerfile
File metadata and controls
66 lines (56 loc) · 2.55 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
FROM --platform=linux/amd64 ubuntu:20.04
ENV DEBIAN_FRONTEND="noninteractive"
ARG LIBFABRIC_VERSION=1.21.0
# Install required packages and dependencies
RUN apt -y update \
&& apt -y install build-essential wget doxygen gnupg gnupg2 curl apt-transport-https software-properties-common libgl1 \
git vim gfortran libtool python3-venv ninja-build python3-pip \
libnuma-dev python3-dev \
&& apt -y remove --purge --auto-remove cmake \
&& wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null\
| gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null \
&& apt-add-repository -y "deb https://apt.kitware.com/ubuntu/ jammy-rc main" \
&& apt -y update
# Build and install libfabric
RUN (if [ -e /tmp/build ]; then rm -rf /tmp/build; fi;) \
&& mkdir -p /tmp/build \
&& cd /tmp/build \
&& wget https://github.com/ofiwg/libfabric/archive/refs/tags/v${LIBFABRIC_VERSION}.tar.gz \
&& tar xf v${LIBFABRIC_VERSION}.tar.gz \
&& cd libfabric-${LIBFABRIC_VERSION} \
&& ./autogen.sh \
&& ./configure \
&& make -j 16 \
&& make install
ARG SPHAE_VERSION=1.5.2
#
# Install miniforge
#
RUN set -eux ; \
curl -LO https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh ; \
bash ./Miniforge3-* -b -p /opt/miniforge3 -s ; \
rm -rf ./Miniforge3-*
ENV PATH /opt/miniforge3/bin:$PATH
#
# Install conda environment
#
RUN set -eux ; \
mamba install -y -c conda-forge -c bioconda -c defaults \
sphae=${SPHAE_VERSION}=pyhdfd78af_0 python==3.11
ENV PATH /opt/miniforge3/bin:$PATH
RUN conda clean -af -y
# install databases - needed or else sphae won't run - makes the container huge but nothing we can really do
RUN sphae install --threads 8 --conda-frontend mamba
# for weird filtlong bug https://github.com/potree/PotreeConverter/issues/281
ENV LC_ALL=C
ENV LANGUAGE=
# download test data
RUN git clone "https://github.com/linsalrob/sphae.git"
# run with --conda-create-envs-only to create all required conda envs (without running itself for speedup)
RUN sphae run --threads 8 --input sphae/tests/data/illumina-subset --output example -k --conda-frontend mamba --conda-create-envs-only
RUN sphae run --threads 8 --input sphae/tests/data/nanopore-subset --sequencing longread --output examplelr -k --conda-frontend mamba --conda-create-envs-only
RUN sphae annotate --threads 8 --genome sphae/tests/data/genome --output exampleg --conda-frontend mamba --conda-create-envs-only
# cleanup
RUN rm -rf example
RUN rm -rf examplelr
RUN rm -rf exampleg