forked from knights-analytics/hugot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.Dockerfile
More file actions
24 lines (17 loc) · 904 Bytes
/
test.Dockerfile
File metadata and controls
24 lines (17 loc) · 904 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
ARG BUILD_PLATFORM=linux/arm64
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.12.3/gotestsum_1.12.3_linux_amd64.tar.gz && \
tar -xzf gotestsum_1.12.3_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/lib64/onnxruntime.so onnxruntime-linux-x64.so
COPY --from=hugot-test /usr/lib/libtokenizers.a libtokenizers.a
COPY --from=hugot-test /cli /hugot-cli-linux-x64