Spaces:
Running
Running
File size: 663 Bytes
306b5be 61868a4 306b5be 61868a4 306b5be 61868a4 e3c5adf 61868a4 306b5be 61868a4 306b5be 61868a4 e3c5adf |
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 |
FROM python:3.9-slim
WORKDIR /app
# Copy requirements first to leverage Docker cache
COPY requirements.txt requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files only (not README.md which has YAML frontmatter)
COPY app.py .
COPY model_service.py .
COPY static/ ./static/
COPY templates/ ./templates/
COPY models/ ./models/
COPY __init__.py .
COPY start.sh .
# Make the start script executable
RUN chmod +x start.sh
# Make port 7860 available (this is the port Hugging Face Spaces expects)
EXPOSE 7860
# Set environment variables
ENV PYTHONUNBUFFERED=1
# Run the application using the startup script
CMD ["./start.sh"] |