-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (23 loc) · 858 Bytes
/
Dockerfile
File metadata and controls
27 lines (23 loc) · 858 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
FROM rust:1.87 AS build
# Add certificate and uncomment if building behind proxy with custom cert
# COPY ./gitignore/ca-certificates.crt /usr/local/share/ca-certificates/ca.crt
# RUN update-ca-certificates
COPY . /project
WORKDIR /project
RUN --mount=type=cache,target=/project/model \
--mount=type=cache,target=/project/ort \
pwd && \
./download-deps.sh && \
cp -r model /model
ENV ORT_LIB_LOCATION=/project/ort/onnxruntime/lib
RUN --mount=type=cache,target=/project/target \
--mount=type=cache,target=/project/ort \
--mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/usr/local/cargo/git \
cargo b --release && \
cp target/release/embedding-api /
FROM debian:bookworm
ENV LD_LIBRARY_PATH=/
COPY --from=build /embedding-api /
COPY --from=build /model /model
ENTRYPOINT ["/embedding-api"]