u
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user