forked from acg-team/ConSTRain
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
60 lines (46 loc) · 1.45 KB
/
Dockerfile
File metadata and controls
60 lines (46 loc) · 1.45 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
# Build stage
FROM rust:slim-bookworm AS builder
# Install build dependencies
RUN apt-get update && apt-get install -y \
build-essential \
clang \
libclang-dev \
libhts-dev \
pkg-config \
git \
curl \
wget \
&& rm -rf /var/lib/apt/lists/*
# Install Miniconda
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh -O /tmp/miniconda.sh && \
bash /tmp/miniconda.sh -b -p /opt/conda && \
rm /tmp/miniconda.sh
ENV PATH="/opt/conda/bin:$PATH"
WORKDIR /app
COPY . .
# Create conda environment
RUN conda env create -f environment.yaml
# Set build environment variables
ENV LIBCLANG_PATH="/usr/lib/aarch64-linux-gnu"
ENV C_INCLUDE_PATH="/usr/include"
# Build ConSTRain
WORKDIR /app/ConSTRain
RUN cargo build --release --bin ConSTRain
# Runtime stage
FROM debian:bookworm-slim
# Install only runtime dependencies
RUN apt-get update && apt-get install -y \
libhts3 \
python3 \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
# Copy the built binary
COPY --from=builder /app/ConSTRain/target/release/ConSTRain /usr/local/bin/ConSTRain
# Copy conda environment for Python dependencies
COPY --from=builder /opt/conda/envs/ConSTRain-analyses /opt/conda/envs/ConSTRain-analyses
# Set up environment
ENV PATH="/opt/conda/envs/ConSTRain-analyses/bin:/usr/local/bin:$PATH"
ENV CONDA_DEFAULT_ENV=ConSTRain-analyses
# Set working directory for Nextflow
WORKDIR /
# No entrypoint - let Nextflow control execution