Spaces:
Sleeping
Sleeping
File size: 676 Bytes
6b54f7d |
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 |
FROM python:3.10-slim
# Set working directory
WORKDIR /app
# Create writable cache directories
RUN mkdir -p /app/.cache/huggingface/hub /app/.cache/torch
RUN chmod -R 777 /app/.cache
# Set environment variables for caches
ENV HF_HOME=/app/.cache/huggingface
ENV TRANSFORMERS_CACHE=/app/.cache/huggingface/transformers
ENV TORCH_HOME=/app/.cache/torch
ENV XDG_CACHE_HOME=/app/.cache
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy app files
COPY . .
# Expose Streamlit port
EXPOSE 7860
# Run Streamlit
CMD ["streamlit", "run", "app4.py", "--server.port=7860", "--server.address=0.0.0.0"] |