Spaces:
Sleeping
Sleeping
# Use an official Python runtime as a parent image | |
FROM python:3.9 | |
# Set the working directory inside the container | |
WORKDIR /app | |
# Set environment variables for Hugging Face cache | |
ENV HF_HOME=/tmp/cache | |
RUN mkdir -p /tmp/cache && chmod 777 /tmp/cache | |
# Install system dependencies | |
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* | |
# Install Python dependencies | |
COPY requirements.txt requirements.txt | |
RUN pip install --no-cache-dir --upgrade pip | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Copy the application code | |
COPY . . | |
# Expose the port for running the app (modify if needed) | |
EXPOSE 7860 | |
# Run the application | |
CMD ["python", "app.py"] | |