-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
77 lines (59 loc) · 2.27 KB
/
Dockerfile
File metadata and controls
77 lines (59 loc) · 2.27 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
FROM python:3.11-slim-bullseye AS basic
ENV PYTHONDONTWRITEBYTECODE=1
RUN apt update && apt install --no-install-recommends -y \
apt-transport-https \
bzip2 \
ca-certificates \
git \
gnupg \
libbz2-1.0 \
libcurl4 \
liblzma5 \
openjdk-11-jdk-headless \
wget \
zip && \
pip install --no-cache-dir -U pip && \
rm -r /var/lib/apt/lists/* && \
rm -r /var/cache/apt/*
FROM basic AS bcftools_compiler
ARG BCFTOOLS_VERSION="1.22"
RUN apt-get update && apt-get install --no-install-recommends -y \
gcc \
libbz2-dev \
libcurl4-openssl-dev \
liblzma-dev \
libssl-dev \
make \
zlib1g-dev && \
wget https://github.com/samtools/bcftools/releases/download/${BCFTOOLS_VERSION}/bcftools-${BCFTOOLS_VERSION}.tar.bz2 && \
tar -xf bcftools-${BCFTOOLS_VERSION}.tar.bz2 && \
cd bcftools-${BCFTOOLS_VERSION} && \
./configure --enable-libcurl --enable-s3 --enable-gcs && \
make && \
strip bcftools plugins/*.so && \
make DESTDIR=/bcftools_install install
FROM basic AS base_bcftools
COPY --from=bcftools_compiler /bcftools_install/usr/local/bin/* /usr/local/bin/
COPY --from=bcftools_compiler /bcftools_install/usr/local/libexec/bcftools/* /usr/local/libexec/bcftools/
FROM base_bcftools AS now_build_clinvarbitration
# now do some fun stuff, installing ClinvArbitration
WORKDIR /clinvarbitration
COPY --from=ghcr.io/astral-sh/uv:0.9.26 /uv /uvx /bin/
# Enable bytecode compilation
ENV UV_COMPILE_BYTECODE=1
# Copy from the cache instead of linking since it's a mounted volume
ENV UV_LINK_MODE=copy
# Install the project's dependencies using the lockfile and settings
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=uv.lock,target=uv.lock \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
uv sync --frozen --no-install-project --no-dev
# Add in the additional requirements that are most likely to change.
COPY LICENSE pyproject.toml uv.lock README.md ./
COPY src src/
RUN --mount=type=cache,target=/root/.cache/uv \
uv pip install .
# Place executables in the environment at the front of the path
ENV PATH="/clinvarbitration/.venv/bin:$PATH"
COPY nextflow nextflow/
ENV VERSION=2.2.10