Spaces:
Runtime error
Runtime error
# Use an official Python runtime | |
FROM python:3.9-slim | |
# Set the working directory | |
WORKDIR /app | |
# Copy the requirements file | |
COPY requirements.txt . | |
# Change permission | |
RUN chmod -R 755 ~/cache/huggingface ~/cache/matplotlib | |
# Set environment variables for Hugging Face and Matplotlib | |
ENV TRANSFORMERS_CACHE=/cache/huggingface | |
ENV MPLCONFIGDIR=/cache/matplotlib | |
# Install dependencies | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Copy the rest of the app | |
COPY . . | |
# Expose the Flask port | |
EXPOSE 5000 | |
# Run the application | |
CMD ["python", "app.py"] |