Some checks failed
CodeQL / Analyze (go) (push) Successful in 6m28s
Docker Image / build-docker (push) Failing after 13m26s
Lint and Testing / lint (push) Successful in 11m17s
Lint and Testing / test (push) Successful in 11m17s
Lint and Testing / golangci (push) Successful in 2m40s
28 lines
862 B
Docker
28 lines
862 B
Docker
# CPU image for Gitea CI and hosts without NVIDIA GPU.
|
|
# Production GPU image: docker/Dockerfile
|
|
|
|
FROM golang:1.23-bookworm AS build
|
|
WORKDIR /app
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
build-essential git cmake pkg-config libsentencepiece-dev \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY . .
|
|
RUN make dependency && make build-xlm
|
|
|
|
FROM debian:bookworm-slim AS runtime
|
|
WORKDIR /app
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY --from=build /app/bin/go-whisper-api /bin/go-whisper-api
|
|
COPY --from=build /app/third_party/whisper.cpp/build/src/libwhisper.so* /usr/local/lib/
|
|
COPY --from=build /app/third_party/whisper.cpp/build/ggml/src/libggml*.so* /usr/local/lib/
|
|
ENV LD_LIBRARY_PATH=/usr/local/lib
|
|
|
|
EXPOSE 8080
|
|
ENTRYPOINT ["/bin/go-whisper-api"]
|