Spaces:
Sleeping
Sleeping
File size: 1,035 Bytes
52f789b d189f1b 52f789b d189f1b 52f789b | 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 28 29 30 31 32 33 34 35 36 37 38 | # ITU-T Report Generator - Hugging Face Spaces Dockerfile
FROM python:3.10-slim
# Set working directory
WORKDIR /app
# Install system dependencies (libcurl needed for pycurl)
RUN apt-get update && apt-get install -y --no-install-recommends \
libcurl4-openssl-dev \
libssl-dev \
gcc \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first (for better caching)
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY web-app/ ./web-app/
COPY scripts-new/ ./scripts-new/
COPY wp_doc_template/ ./wp_doc_template/
COPY question_doc_template/ ./question_doc_template/
# Create temp directory for generated reports
RUN mkdir -p /app/web-app/temp
# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV FLASK_APP=web-app/app.py
# Expose port for Hugging Face Spaces (must be 7860)
EXPOSE 7860
# Run the application
CMD ["python", "-c", "import sys; sys.path.insert(0, 'web-app'); from app import app; app.run(host='0.0.0.0', port=7860)"]
|