Spaces:
Runtime error
Runtime error
FROM python:3.9 | |
# Set working directory | |
WORKDIR /app | |
# Install required system packages | |
RUN apt-get update && apt-get install -y \ | |
libgl1-mesa-glx \ | |
libportaudio2 \ | |
portaudio19-dev \ | |
ffmpeg \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Create necessary directories | |
RUN mkdir -p uploads static | |
RUN mkdir -p /var/cache/fontconfig && chmod 777 /var/cache/fontconfig | |
# Set environment variables | |
ENV MPLCONFIGDIR=/tmp | |
ENV YOLO_CONFIG_DIR=/tmp | |
ENV FONTCONFIG_PATH=/var/cache/fontconfig | |
# Install Python dependencies | |
COPY Web_app/requirements.txt ./requirements.txt | |
RUN pip install --upgrade pip | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Explicitly install OpenAI Whisper | |
RUN pip install openai-whisper==20231117 | |
RUN python -c "import whisper; print('Whisper installed successfully')" | |
# Copy application code | |
COPY Web_app . | |
# Expose the port for Hugging Face | |
EXPOSE 5000 | |
# Command to run the app | |
CMD ["python", "app.py"] |