-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathtest.Dockerfile
More file actions
25 lines (18 loc) · 999 Bytes
/
test.Dockerfile
File metadata and controls
25 lines (18 loc) · 999 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
ARG BUILD_PLATFORM=linux/amd64
FROM ghcr.io/knights-analytics/hugot/models:latest AS models
FROM --platform=$BUILD_PLATFORM hugot:latest AS hugot-test
COPY . /build
COPY --from=models /models /build/models
RUN cd /build && \
chown -R testuser:testuser /build && \
curl -LO https://github.com/gotestyourself/gotestsum/releases/download/v1.13.0/gotestsum_1.13.0_linux_amd64.tar.gz && \
tar -xzf gotestsum_1.13.0_linux_amd64.tar.gz --directory /usr/local/bin && \
# entrypoint
cp /build/scripts/entrypoint.sh /entrypoint.sh && sed -i 's/\r//g' /entrypoint.sh && chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
#--- artifacts layer ---
FROM --platform=$BUILD_PLATFORM scratch AS artifacts
COPY --from=hugot-test /usr/lib/libonnxruntime.so libonnxruntime-linux-x64.so
COPY --from=hugot-test /usr/lib/libonnxruntime-genai.so libonnxruntime-genai-linux-x64.so
COPY --from=hugot-test /usr/lib/libtokenizers.a libtokenizers.a
COPY --from=hugot-test /cli /hugot-cli-linux-x64