forked from boocmp/go-stt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (22 loc) · 886 Bytes
/
Dockerfile
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
31
32
33
34
35
FROM nvidia/cuda:12.4.1-devel-ubuntu22.04
ARG GGML_MODEL=small
RUN apt update && DEBIAN_FRONTEND=noninteractive apt install -y \
bash git make vim wget g++
ENV GOLANG_VERSION 1.20
RUN wget -nv -O - https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-amd64.tar.gz \
| tar -C /usr/local -xz
ENV PATH /usr/local/go/bin:$PATH
WORKDIR /app
LABEL org.opencontainers.image.description="Speech-to-Text."
LABEL org.opencontainers.image.licenses=MIT
COPY . .
RUN make clone
WORKDIR /app/third_party/whisper.cpp
RUN make clean
RUN WHISPER_CUBLAS=1 make -j libwhisper.a
WORKDIR /app/third_party/whisper.cpp/
RUN bash ./models/download-ggml-model.sh $GGML_MODEL
WORKDIR /app
RUN mkdir ./models && mv /app/third_party/whisper.cpp/models/ggml-*.bin ./models/ggml-model.bin
RUN make build && mv bin/transcriber /bin/ && rm -rf bin
ENTRYPOINT [ "/bin/transcriber" ]