Spaces:
Sleeping
Sleeping
File size: 572 Bytes
3531951 b38bcba 8c60dc7 b38bcba 8c60dc7 b38bcba 3531951 |
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 |
# Use an official Python runtime as the base image
FROM python:3.10
# Set the working directory in the container
WORKDIR /app
# Create a cache directory for Hugging Face models
RUN mkdir -p /app/cache && chmod -R 777 /app/cache
# Set environment variable for cache
ENV HF_HOME=/app/cache
# Copy the dependencies file
COPY requirements.txt .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application files
COPY . .
# Expose port 7860 for Flask
EXPOSE 7860
# Command to run the application
CMD ["python", "app.py"]
|