-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
33 lines (20 loc) · 786 Bytes
/
Dockerfile
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
FROM rust:slim-bookworm AS builder
WORKDIR /tmp/
RUN apt-get update -y && apt-get --no-install-recommends install git libssl-dev pkg-config -y
RUN git clone https://github.com/NickAcPT/nmsr-rs/
WORKDIR /tmp/nmsr-rs/
RUN git checkout main
RUN RUSTFLAGS="-Ctarget-cpu=native" cargo build --release --bin nmsr-aas --features ears --package nmsr-aas
FROM rust:slim-bookworm
RUN apt-get update -y && apt-get --no-install-recommends install mesa-vulkan-drivers -y
WORKDIR /nmsr/
COPY --from=builder /tmp/nmsr-rs/target/release/nmsr-aas /nmsr/nmsr-aas
COPY ./config.toml /nmsr/config.toml
ENV NMSR_USE_SMAA=1
ENV NMSR_SAMPLE_COUNT=1
ENV WGPU_BACKEND=vulkan
ENV RUST_BACKTRACE=1
RUN chmod +x /nmsr/nmsr-aas
EXPOSE 8080
# Set the entrypoint script
CMD /nmsr/nmsr-aas -c config.toml