-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdkfileexample
More file actions
30 lines (22 loc) · 807 Bytes
/
dkfileexample
File metadata and controls
30 lines (22 loc) · 807 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
# Build stage
FROM golang:1.23-alpine AS builder
RUN apk add --no-cache gcc musl-dev
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=1 go build -o skyclf ./cmd/server
# Runtime stage
FROM alpine:3.19
# Install ONNX Runtime
RUN apk add --no-cache wget ca-certificates libstdc++ && \
wget -q https://github.com/microsoft/onnxruntime/releases/download/v1.16.3/onnxruntime-linux-x64-1.16.3.tgz && \
tar xzf onnxruntime-linux-x64-1.16.3.tgz && \
mv onnxruntime-linux-x64-1.16.3/lib/libonnxruntime.so.1.16.3 /usr/lib/ && \
ln -s /usr/lib/libonnxruntime.so.1.16.3 /usr/lib/libonnxruntime.so && \
rm -rf onnxruntime-linux-x64-1.16.3*
WORKDIR /app
COPY --from=builder /app/skyclf .
ENV SKYCLF_ORT_LIB=/usr/lib/libonnxruntime.so
EXPOSE 8080
CMD ["./skyclf"]