ayman-ejaz-dev's picture
Update Dockerfile
77dc8ac verified
# 1. Base Image (Python ka lightweight version)
FROM python:3.9-slim
# 2. System dependencies (PIL/Pillow aur Torch ke liye zaroori hain)
RUN apt-get update && apt-get install -y \
libgl1-mesa-glx \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# 3. App directory banayein
WORKDIR /app
# 4. Requirements copy aur install karein
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 5. Baqi saara code copy karein
COPY . .
# 6. Hugging Face Spaces ya Local ke liye port 7860 expose karein
EXPOSE 7860
# 7. Flask App run karein
CMD ["python", "app.py"]