This commit is contained in:
Kar
2025-06-15 21:47:28 +05:30
parent 2bd8b22cfa
commit 9562d16078
2 changed files with 38 additions and 38 deletions

View File

@@ -1,7 +1,6 @@
# Base image
FROM ubuntu:22.04
# Install system dependencies
# Install dependencies
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
@@ -16,7 +15,7 @@ RUN apt-get update && apt-get install -y \
# Set working directory
WORKDIR /app
# Clone whisper.cpp and compile
# Clone and build whisper.cpp
RUN git clone https://github.com/ggerganov/whisper.cpp.git && \
cd whisper.cpp && \
make
@@ -35,12 +34,13 @@ COPY app.py .
# Create uploads directory
RUN mkdir -p uploads
# Environment variables (adjust paths if needed)
# Correct paths (critical fix!)
ENV WHISPER_CPP_PATH="/app/whisper.cpp/main"
ENV MODEL_PATH="/app/whisper.cpp/models/ggml-small.en.bin"
# Expose Flask port
EXPOSE 4002
# Verify the binary exists (debugging step)
RUN ls -lh /app/whisper.cpp/main && \
ls -lh /app/whisper.cpp/models/ggml-small.en.bin
# Run the API
EXPOSE 5000
CMD ["python3", "app.py"]