-
-
Notifications
You must be signed in to change notification settings - Fork 182
Expand file tree
/
Copy pathDockerfile
More file actions
59 lines (49 loc) · 2.06 KB
/
Dockerfile
File metadata and controls
59 lines (49 loc) · 2.06 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
# CNVkit Production Docker Image
# For portable execution in pipelines (Nextflow, WDL, etc.)
#
# Build:
# docker build -t etal/cnvkit:VERSION .
#
# Run:
# docker run -v /path/to/data:/data etal/cnvkit:latest cnvkit.py --help
FROM continuumio/miniconda3:latest
LABEL org.opencontainers.image.title="CNVkit" \
org.opencontainers.image.description="Copy number variant detection from high-throughput sequencing" \
org.opencontainers.image.authors="Eric Talevich <52723+etal@users.noreply.github.com>" \
org.opencontainers.image.url="https://github.com/etal/cnvkit" \
org.opencontainers.image.documentation="https://cnvkit.readthedocs.io" \
org.opencontainers.image.source="https://github.com/etal/cnvkit" \
org.opencontainers.image.licenses="Apache-2.0"
# Build argument for CNVkit version (passed from GHA or make)
ARG CNVKIT_VERSION
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
# Install CNVkit and dependencies via conda
# This ensures R and DNAcopy are properly configured
COPY conda-env.yml /tmp/conda-env.yml
RUN conda env update -v -n base -f /tmp/conda-env.yml \
&& conda clean --all --yes --force-pkgs-dirs \
&& rm /tmp/conda-env.yml
# Install CNVkit from PyPI or local source
# If CNVKIT_VERSION is set, install that specific version from PyPI
# Otherwise, install from local source (for development builds)
COPY . /tmp/cnvkit
RUN if [ -n "$CNVKIT_VERSION" ]; then \
echo "Installing CNVkit version ${CNVKIT_VERSION} from PyPI"; \
pip install --no-cache-dir cnvkit==${CNVKIT_VERSION}; \
else \
echo "Installing CNVkit from local source"; \
pip install --no-cache-dir /tmp/cnvkit; \
fi \
&& rm -rf /tmp/cnvkit
# Verify installation and build matplotlib font cache
RUN cnvkit.py version
# Copy helper scripts to PATH
COPY scripts/snpfilter.sh /usr/local/bin/
# Create non-root user for security
RUN useradd -m -s /bin/bash cnvkit
USER cnvkit
WORKDIR /data
# Default command shows help
CMD ["cnvkit.py", "--help"]