-
-
Notifications
You must be signed in to change notification settings - Fork 93
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (33 loc) · 1.58 KB
/
Copy pathDockerfile
File metadata and controls
41 lines (33 loc) · 1.58 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
# syntax=docker/dockerfile:1.7
FROM ubuntu:26.04 AS builder
ARG DEBIAN_FRONTEND=noninteractive
# Link the published ghcr image to the repo so repo admins manage it
# (vs. needing org-owner access to package settings).
LABEL org.opencontainers.image.source="https://github.com/ScrollPrize/villa"
LABEL org.opencontainers.image.description="volume-cartographer CI builder (Ubuntu 26.04 resolute)"
LABEL org.opencontainers.image.licenses="GPL-3.0"
# Build deps live in scripts/install_build_deps.sh — the single source of
# truth shared with scripts/ec2_setup.sh. The BuildKit cache mount stays
# here so apt layer caching still applies.
COPY scripts/install_build_deps.sh /tmp/install_build_deps.sh
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
bash /tmp/install_build_deps.sh \
&& rm -f /tmp/install_build_deps.sh
FROM builder AS build
COPY . /src
WORKDIR /src
RUN cmake --preset ci-release-gcc \
&& cmake --build --preset ci-release-gcc \
# Lay the tree out as /usr/local/{bin,lib}. The apps resolve their internal
# shared libs via the install RPATH ($ORIGIN/../lib, set in CMakeLists.txt).
&& cmake --install build/ci-release-gcc --prefix /usr/local --component vc_runtime
FROM build AS runtime
RUN install -m 0755 /dev/stdin /usr/local/bin/vc3d <<'BASH'
#!/usr/bin/env bash
set -euo pipefail
exec env OMP_NUM_THREADS=8 OMP_WAIT_POLICY=PASSIVE OMP_NESTED=FALSE nice ionice VC3D "$@"
BASH
COPY docker_s3_entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
ENV WANDB_ENTITY="vesuvius-challenge"