File size: 585 Bytes
bb8fa59 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | FROM python:3.9-slim
# Set working directory
WORKDIR /app
# Copy application files
COPY app.py .
COPY index.html .
# Install system dependencies (for Pillow and reportlab)
RUN apt-get update && apt-get install -y \
libjpeg-dev \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
RUN pip install --no-cache-dir flask qrcode pillow reportlab
# Expose port 7860 for Hugging Face Spaces
EXPOSE 7860
# Set environment variables
ENV FLASK_APP=app.py
ENV FLASK_ENV=production
# Run the Flask app
CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"] |