forked from NVIDIA-NeMo/Switchyard
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (22 loc) · 869 Bytes
/
Copy pathDockerfile
File metadata and controls
31 lines (22 loc) · 869 Bytes
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
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# Keep RUST_VERSION in sync with rust-toolchain.toml.
ARG RUST_VERSION=1.96.1
FROM rust:${RUST_VERSION}-bookworm AS builder
WORKDIR /opt/switchyard
COPY Cargo.toml Cargo.lock rust-toolchain.toml ./
# .cargo/config.toml carries the workspace rustflags (target-cpu, force-frame-pointers).
COPY .cargo ./.cargo
COPY crates ./crates
RUN cargo build --locked --release -p switchyard-server
FROM debian:bookworm-slim
RUN apt-get update \
&& apt-get install --no-install-recommends -y ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder \
/opt/switchyard/target/release/switchyard-server \
/usr/local/bin/switchyard-server
ENV HOME=/tmp
USER 1000:1000
EXPOSE 4000
ENTRYPOINT ["switchyard-server"]