Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
55 lines (46 loc) · 1.93 KB
/
Copy pathDockerfile
File metadata and controls
55 lines (46 loc) · 1.93 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
# syntax=docker/dockerfile:1
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2026 Flare community contributors
# SPDX-License-Identifier: Apache-2.0
FROM rust:1.94.1-slim-trixie AS build
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential cmake nasm pkg-config protobuf-compiler \
&& if [ "$(dpkg --print-architecture)" = arm64 ]; then \
apt-get install -y --no-install-recommends libibverbs-dev; \
fi \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /src
COPY flare/ flare/
COPY helios/ helios/
COPY eos/ eos/
COPY selene/ selene/
COPY selene-manager/ selene-manager/
COPY ignition/recipes/qwen38/assets/ ignition/recipes/qwen38/assets/
COPY ignition/recipes/step5/assets/ ignition/recipes/step5/assets/
COPY ignition/recipes/kimi3/assets/ ignition/recipes/kimi3/assets/
ARG TARGETARCH
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,id=flare-target-${TARGETARCH},target=/src/flare/target \
cargo build --locked --release --manifest-path flare/Cargo.toml --bin flare \
&& install -Dm755 flare/target/release/flare /out/flare \
&& strip /out/flare
FROM debian:trixie-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends libgcc-s1 \
&& if [ "$(dpkg --print-architecture)" = arm64 ]; then \
apt-get install -y --no-install-recommends libibverbs1 ibverbs-providers; \
fi \
&& rm -rf /var/lib/apt/lists/* \
&& groupadd --gid 10001 flare \
&& useradd --uid 10001 --gid flare --create-home --no-log-init \
--shell /usr/sbin/nologin flare
COPY --from=build /out/flare /usr/local/bin/flare
COPY LICENSE NOTICE /usr/share/doc/flare/
COPY helios/licenses/PyTorch.txt /usr/share/doc/flare/licenses/PyTorch.txt
USER flare
WORKDIR /home/flare
EXPOSE 8000
STOPSIGNAL SIGTERM
ENTRYPOINT ["/usr/local/bin/flare"]
CMD ["--help"]