master
parent
9562d16078
commit
d5e7358096
22
Dockerfile
22
Dockerfile
|
@ -15,13 +15,19 @@ RUN apt-get update && apt-get install -y \
|
||||||
# Set working directory
|
# Set working directory
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Clone and build whisper.cpp
|
# Clone whisper.cpp (shallow clone to save space)
|
||||||
RUN git clone https://github.com/ggerganov/whisper.cpp.git && \
|
RUN git clone --depth 1 https://github.com/ggerganov/whisper.cpp.git
|
||||||
cd whisper.cpp && \
|
|
||||||
make
|
# Build whisper.cpp (with explicit targets)
|
||||||
|
RUN cd whisper.cpp && \
|
||||||
|
make main
|
||||||
|
|
||||||
|
# Verify the binary was built
|
||||||
|
RUN ls -lh /app/whisper.cpp/main
|
||||||
|
|
||||||
# Download the small.en model
|
# Download the small.en model
|
||||||
RUN cd whisper.cpp/models && \
|
RUN mkdir -p /app/whisper.cpp/models && \
|
||||||
|
cd /app/whisper.cpp/models && \
|
||||||
curl -L "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-small.en.bin" --output ggml-small.en.bin
|
curl -L "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-small.en.bin" --output ggml-small.en.bin
|
||||||
|
|
||||||
# Install Python dependencies
|
# Install Python dependencies
|
||||||
|
@ -34,13 +40,9 @@ COPY app.py .
|
||||||
# Create uploads directory
|
# Create uploads directory
|
||||||
RUN mkdir -p uploads
|
RUN mkdir -p uploads
|
||||||
|
|
||||||
# Correct paths (critical fix!)
|
# Set environment variables
|
||||||
ENV WHISPER_CPP_PATH="/app/whisper.cpp/main"
|
ENV WHISPER_CPP_PATH="/app/whisper.cpp/main"
|
||||||
ENV MODEL_PATH="/app/whisper.cpp/models/ggml-small.en.bin"
|
ENV MODEL_PATH="/app/whisper.cpp/models/ggml-small.en.bin"
|
||||||
|
|
||||||
# Verify the binary exists (debugging step)
|
|
||||||
RUN ls -lh /app/whisper.cpp/main && \
|
|
||||||
ls -lh /app/whisper.cpp/models/ggml-small.en.bin
|
|
||||||
|
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
CMD ["python3", "app.py"]
|
CMD ["python3", "app.py"]
|
||||||
|
|
Loading…
Reference in New Issue