-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
70 lines (58 loc) · 1.9 KB
/
Copy pathDockerfile
File metadata and controls
70 lines (58 loc) · 1.9 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
# Multi-stage build for smaller image
FROM python:3.11-slim as builder
WORKDIR /build
# Install build dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
libc-dev \
libcurl4-openssl-dev \
libssl-dev \
zlib1g-dev \
libbz2-dev \
liblzma-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy and install package
COPY . .
RUN pip wheel --no-cache-dir --wheel-dir /wheels -e .
FROM python:3.11-slim
LABEL maintainer="Arun S. Seetharam <aseethar@purdue.edu>"
LABEL description="bsaseq: Bulk Segregant Analysis for QTL mapping"
LABEL version="1.0.0"
LABEL org.opencontainers.image.source="https://github.com/rcac-bioinformatics/bsaseq"
LABEL org.opencontainers.image.documentation="https://rcac-bioinformatics.github.io/bsaseq"
LABEL org.opencontainers.image.licenses="MIT"
WORKDIR /data
# Install runtime dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
libcurl4 \
zlib1g \
libbz2-1.0 \
liblzma5 \
tabix \
&& rm -rf /var/lib/apt/lists/*
# Copy wheels and install
COPY --from=builder /wheels /wheels
RUN pip install --no-cache-dir /wheels/* && rm -rf /wheels
# Install snpEff (optional, makes image larger)
ARG INSTALL_SNPEFF=true
RUN if [ "$INSTALL_SNPEFF" = "true" ]; then \
apt-get update && apt-get install -y --no-install-recommends \
default-jre-headless \
wget \
unzip \
&& wget -q https://snpeff-public.s3.amazonaws.com/versions/snpEff_latest_core.zip \
&& unzip snpEff_latest_core.zip -d /opt \
&& rm snpEff_latest_core.zip \
&& apt-get remove -y wget unzip \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*; \
fi
ENV PATH="/opt/snpEff/exec:${PATH}"
RUN if [ -f /opt/snpEff/exec/snpeff ]; then \
ln -s /opt/snpEff/exec/snpeff /opt/snpEff/exec/snpEff; \
fi
# Create non-root user
RUN useradd -m -s /bin/bash bsaseq
USER bsaseq
ENTRYPOINT ["bsaseq"]
CMD ["--help"]