File size: 748 Bytes
c9dcc3b | 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 29 30 31 | FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
WORKDIR /app
# System deps (kept minimal)
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install Python deps first for better layer caching
COPY requirements-api.txt /app/requirements-api.txt
RUN pip install --no-cache-dir -r /app/requirements-api.txt
# Copy app code (full context). This makes the Space more tolerant to layouts:
# - ./src/triage_llm (recommended)
# - ./triage_llm (fallback)
COPY . /app
# Hugging Face Spaces expects the app to listen on 7860
EXPOSE 7860
ENV TRIAGE_BACKEND=stub \
PORT=7860
RUN sed -i 's/\r$//' /app/start.sh && chmod +x /app/start.sh
CMD ["/app/start.sh"]
|