devil2810's picture
update Dockerfile
9883b3f verified
raw
history blame contribute delete
457 Bytes
# 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"]