Spaces:
Paused
Paused
File size: 601 Bytes
7974909 d828ce4 ad51e60 df73b1b ad51e60 9bbec6e df73b1b c2cdb2d a4c773d ad51e60 2bd30ac ad51e60 cade06f c2cdb2d ad51e60 e15bda4 a2b3d9e ad51e60 |
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 |
FROM python:3.10-slim
# Set working directory
WORKDIR /app
# Copy requirements first to leverage Docker cache
COPY requirements.txt .
# Install dependencies and clean cache
RUN pip install --no-cache-dir -r requirements.txt && \
rm -rf /root/.cache/huggingface && \
rm -rf /root/.cache/pip
# Copy only what's needed
COPY main/ ./main/
# Set environment variables
ENV PYTHONPATH=/app
ENV PYTHONUNBUFFERED=1
# Clear any cache that might have been created
RUN rm -rf ~/.cache/huggingface
# Expose the port
EXPOSE 7680
# Use same command as working version
CMD ["python", "-m", "main.app"] |