Spaces:
Build error
Build error
| FROM python:3.10-slim | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| libgl1-mesa-glx \ | |
| libglib2.0-0 \ | |
| ffmpeg \ | |
| wget \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Create directories | |
| RUN mkdir -p /tmp/Ultralytics /tmp/snapshots && \ | |
| chmod -R 777 /tmp/Ultralytics /tmp/snapshots | |
| # Set environment variables | |
| ENV YOLO_CONFIG_DIR=/tmp/Ultralytics | |
| ENV PYTHONUNBUFFERED=1 | |
| # Install Python dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application code | |
| COPY app.py /app.py | |
| COPY data.yaml /data.yaml | |
| # Download custom model weights | |
| RUN wget -O /tmp/yolov8_custom.pt https://huggingface.co/PrashanthB461/SafetyViolationAI1/resolve/main/yolov8_custom.pt | |
| # Run the application | |
| CMD ["python", "/app.py"] |