Spaces:
Runtime error
Runtime error
File size: 646 Bytes
7ddc2f8 bdd6e99 117ead1 d5516d0 7ddc2f8 d5516d0 2fc13f2 7ddc2f8 117ead1 7ddc2f8 117ead1 bdd6e99 7ddc2f8 |
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 28 |
# Use a slim base image
FROM python:3.10-slim
# Install dependencies
RUN apt-get update && \
apt-get install -y git && \
rm -rf /var/lib/apt/lists/*
# Optional: copy requirements file and install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy your app code into the container
WORKDIR /app
COPY app.py /app/app.py
# Create a writable cache directory
RUN mkdir -p /app/cache
# Set environment variables for cache and disable root cache attempts
ENV TRANSFORMERS_CACHE=/app/cache
ENV HF_HOME=/app/cache
# Expose port (for Gradio/Streamlit etc.)
EXPOSE 7860
# Launch your app
CMD ["python", "app.py"] |