Spaces:
Sleeping
Sleeping
FROM python:3.9-slim | |
WORKDIR /app | |
# Create the cache directory and give full write permissions | |
RUN mkdir -p /app/cache && chmod -R 777 /app/cache | |
# Set TORCH_HOME to the cache directory | |
ENV TORCH_HOME=/app/cache | |
COPY requirements.txt . | |
RUN pip install --upgrade pip && \ | |
pip install --no-cache-dir -r requirements.txt | |
COPY . . | |
EXPOSE 7860 | |
CMD ["python", "app.py"] | |