Repository navigation
Expand file tree
/
Copy pathsingularity.def
More file actions
82 lines (67 loc) · 2.42 KB
/
Copy pathsingularity.def
File metadata and controls
82 lines (67 loc) · 2.42 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
Bootstrap: docker
From: condaforge/miniforge3:26.1.1-3
Stage: build
%labels
MyLabel nspectra
authors="andrea.talenti@ed.ac.uk"
description="Docker image containing base requirements for nf-LO pipelines"
%post
# Install the package as normal:
mamba create -n nspectra -c conda-forge -c bioconda -y python=3.10 \
pip matplotlib numpy>=1.22.4 pandas polars==1.9.0 \
pyarrow pysam scipy bioconda::java-jdk
mamba install -n nspectra -y \
bioconda::samtools bioconda::bcftools bioconda::vcftools \
bioconda::bedtools bioconda::plink=1.90
mamba install -n nspectra -y bioconda::ucsc-twobitinfo bioconda::ucsc-fatotwobit \
bioconda::ucsc-wigtobigwig bioconda::ucsc-bigwigtobedgraph
mamba install -n nspectra -y bioconda::vcflib==1.0.3
mamba install -n nspectra -y bioconda::shapeit4
mamba install -n nspectra -y bioconda::shapeit5
mamba install -n nspectra -y \
bioconda::perl-bioperl \
bioconda::phast=1.5 bioconda::mutyper bioconda::perl-bio-db-hts \
bioconda::tabix bioconda::tabixpp=1.1.0
mamba install -n nspectra -y \
conda-forge::r-base>=4.1.0 \
conda-forge::r-cowplot \
conda-forge::r-tidyverse \
conda-forge::r-reshape2 \
conda-forge::r-ggfortify \
conda-forge::r-ggforce \
conda-forge::r-lazyeval \
conda-forge::r-plyr
# Install conda-pack:
conda install -c conda-forge conda-pack
# Use conda-pack to create a standalone enviornment
# in /venv:
conda-pack -n nspectra -o /tmp/env.tar && \
mkdir /venv && cd /venv && tar xf /tmp/env.tar && \
rm /tmp/env.tar
# We've put venv in same path it'll be in final image,
# so now fix up paths:
/venv/bin/conda-unpack
# The runtime-stage image; we can use Debian as the
# base image since the Conda env also includes Python
# for us.
Bootstrap: docker
From: ubuntu:24.04
Stage: runtime
%files from build
/venv /venv
%post
# Install procps in debian to make it compatible with reporting
apt-get update && apt install -y file jellyfish procps g++ curl git wget parallel && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
curl -o /usr/local/bin/datasets https://ftp.ncbi.nlm.nih.gov/pub/datasets/command-line/LATEST/linux-amd64/datasets && \
chmod a+x /usr/local/bin/datasets
# Copy /venv from the previous stage:
# When image is run, run the code with the environment
# activated:
PATH=/venv/bin/:$PATH
SHELL ["/bin/bash", "-c"]
%environment
export PATH=/venv/bin/:$PATH
%runscript
exec /bin/bash "$@"
%startscript
exec /bin/bash "$@"