master
parent
5f21ed8fc4
commit
cff5634ac1
13
Dockerfile
13
Dockerfile
|
@ -9,7 +9,6 @@ RUN apt-get update && apt-get install -y \
|
||||||
python3 \
|
python3 \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
wget \
|
|
||||||
libavcodec-dev \
|
libavcodec-dev \
|
||||||
libavformat-dev \
|
libavformat-dev \
|
||||||
libavutil-dev \
|
libavutil-dev \
|
||||||
|
@ -21,10 +20,6 @@ RUN git clone https://github.com/ggerganov/whisper.cpp.git /whisper.cpp
|
||||||
WORKDIR /whisper.cpp
|
WORKDIR /whisper.cpp
|
||||||
RUN make
|
RUN make
|
||||||
|
|
||||||
# Download model
|
|
||||||
RUN mkdir -p models && \
|
|
||||||
wget https://huggingface.co/datasets/ggerganov/whisper.cpp/resolve/main/ggml-base.en.bin -O models/ggml-base.en.bin
|
|
||||||
|
|
||||||
FROM ubuntu:22.04 AS runtime
|
FROM ubuntu:22.04 AS runtime
|
||||||
|
|
||||||
# Install runtime dependencies
|
# Install runtime dependencies
|
||||||
|
@ -38,9 +33,13 @@ RUN apt-get update && apt-get install -y \
|
||||||
libswresample-dev \
|
libswresample-dev \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Copy only necessary files from builder
|
# Copy whisper.cpp executable
|
||||||
COPY --from=builder /whisper.cpp/main /whisper.cpp/main
|
COPY --from=builder /whisper.cpp/main /whisper.cpp/main
|
||||||
COPY --from=builder /whisper.cpp/models /whisper.cpp/models
|
|
||||||
|
# Create models directory and copy your local model
|
||||||
|
RUN mkdir -p /whisper.cpp/models
|
||||||
|
COPY model/ggml-tiny.en.bin /whisper.cpp/models/ggml-tiny.en.bin
|
||||||
|
|
||||||
WORKDIR /whisper.cpp
|
WORKDIR /whisper.cpp
|
||||||
|
|
||||||
# Install Python dependencies
|
# Install Python dependencies
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue