From d5e73580961fe7e92bb2430a0cdbe936294f155c Mon Sep 17 00:00:00 2001 From: Kar l5 Date: Sun, 15 Jun 2025 21:52:48 +0530 Subject: [PATCH] u --- Dockerfile | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index b8bcff2..8a69c21 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,13 +15,19 @@ RUN apt-get update && apt-get install -y \ # Set working directory WORKDIR /app -# Clone and build whisper.cpp -RUN git clone https://github.com/ggerganov/whisper.cpp.git && \ - cd whisper.cpp && \ - make +# Clone whisper.cpp (shallow clone to save space) +RUN git clone --depth 1 https://github.com/ggerganov/whisper.cpp.git + +# 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 -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 # Install Python dependencies @@ -34,13 +40,9 @@ COPY app.py . # Create uploads directory RUN mkdir -p uploads -# Correct paths (critical fix!) +# Set environment variables ENV WHISPER_CPP_PATH="/app/whisper.cpp/main" 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 CMD ["python3", "app.py"]