Spaces:
Runtime error
Runtime error
# Use official Python image | |
FROM python:3.9-slim | |
# Set environment variables to avoid permission issues | |
ENV MPLCONFIGDIR=/tmp | |
ENV YOLO_CONFIG_DIR=/tmp | |
ENV OPENAI_API_KEY=your_openai_key_here | |
# Set working directory | |
WORKDIR /app | |
# Install system dependencies | |
RUN apt-get update && \ | |
apt-get install -y libgl1-mesa-glx portaudio19-dev ffmpeg && \ | |
rm -rf /var/lib/apt/lists/* | |
# Copy requirements and install dependencies | |
COPY Web_app/requirements.txt ./requirements.txt | |
RUN pip install --upgrade pip | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Copy your app code | |
COPY Web_app /app/ | |
# Expose the Flask port | |
EXPOSE 7860 | |
# Run the app | |
CMD ["python", "app.py"] | |