-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
51 lines (47 loc) · 1.68 KB
/
Dockerfile
File metadata and controls
51 lines (47 loc) · 1.68 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
FROM python:3.13-bookworm AS deps
WORKDIR /app
COPY --from=ghcr.io/virtool/tools:1.1.0 /tools/bowtie2/2.5.4/bowtie* /usr/local/bin/
COPY --from=ghcr.io/virtool/tools:1.1.0 /tools/pigz/2.8/pigz /usr/local/bin/
COPY --from=ghcr.io/virtool/tools:1.1.0 /tools/samtools/1.22.1/bin/samtools /usr/local/bin/
FROM python:3.13-bookworm AS uv
WORKDIR /app
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
RUN apt-get update && \
apt-get install -y --no-install-recommends libclang-dev && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean
ENV PATH="/root/.cargo/bin:/root/.local/bin:${PATH}" \
UV_CACHE_DIR='/tmp/uv_cache'
COPY Cargo.toml Cargo.lock uv.lock pyproject.toml README.md ./
COPY python/ ./python
COPY src ./src
RUN uv sync
RUN uv run maturin develop --release
FROM deps AS base
WORKDIR /app
ENV VIRTUAL_ENV=/app/.venv \
PATH="/app/.venv/bin:${PATH}"
COPY --from=uv /app/.venv /app/.venv
COPY --from=uv /app/python /app/python
COPY fixtures.py workflow.py VERSION* ./
FROM deps AS dev
WORKDIR /app
ENV PATH="/root/.cargo/bin:/root/.local/bin:${PATH}" \
UV_CACHE_DIR='/tmp/uv_cache'
RUN apt-get update && \
apt-get install -y --no-install-recommends libclang-dev && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
FROM dev AS test
COPY Cargo.lock Cargo.toml pyproject.toml uv.lock ./
COPY README.md ./
COPY src ./src
COPY python ./python
RUN uv sync
RUN uv run maturin develop --release
COPY example ./example
COPY tests ./tests
COPY fixtures.py workflow.py VERSION* ./