Muhammad commited on
Create Dockerfile
Browse files12345678910111213141516171819202122232425262728# Use a lightweight Python imageFROM python:3.10-slim
# Set working directoryWORKDIR /app
# Install system dependencies for OpenCV/Pillow if neededRUN apt-get update && apt-get install -y \ libgl1-mesa-glx \ libglib2.0-0 \ && rm -rf /var/lib/apt/lists/*
# Copy requirements and installCOPY requirements.txt .RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the applicationCOPY . .
# Create uploads directory and set permissionsRUN mkdir -p uploads && chmod 777 uploads
# Expose the port Flask runs onEXPOSE 7860
# Command to run the application# Note: We use port 7860 as it is the default for Hugging Face SpacesCMD ["python", "app.py"]DockerfileAdded+28