File size: 457 Bytes
8205a80 9883b3f 8205a80 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# Use official slim Python image
FROM python:3.8-slim
WORKDIR /app
# Copy project files
COPY . /app
# Upgrade pip and install dependencies
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
# Expose port used by HF Spaces Docker (default 7860)
EXPOSE 7860
# Set environment variables for Hugging Face cache
ENV TRANSFORMERS_CACHE=/tmp/huggingface/transformers
ENV HF_HOME=/tmp/huggingface
# Start the Flask app
CMD ["python", "app.py"]
|