Huggingface / Dockerfile
DeepParmar's picture
Upload 5 files
a2d0f88 verified
Raw History Blame Contribute Delete
446 Bytes
FROM python:3.11
# Create a user with UID 1000 (Required for Hugging Face Spaces)
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
# Copy requirements and install
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy all application files
COPY --chown=user . .
# Run the Flask app on Port 7860 using Gunicorn
CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]