Spaces:
Sleeping
Sleeping
File size: 555 Bytes
8a169a0 7b7fda0 374c67c 8a169a0 | 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 | FROM python:3.10-slim
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential && rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy all source
COPY . .
ENV PYTHONPATH="/app:/app/engines"
ENV HF_SPACE="1"
# Numba JIT disk cache — persists compiled kernels within the container
# lifecycle so only the first warmup pays compilation cost.
ENV NUMBA_CACHE_DIR="/tmp/numba_cache"
EXPOSE 7860
CMD ["python", "app.py"]
|