FROM python:3.11-slim # set working dir WORKDIR /app # install system deps (for pandas/numpy build) RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ gcc \ libpq-dev \ && rm -rf /var/lib/apt/lists/* # copy files COPY pipeline_with_agents.py /app/pipeline_with_agents.py COPY app.py /app/app.py COPY requirements.txt /app/requirements.txt # install python deps RUN pip install --no-cache-dir --upgrade pip \ && pip install --no-cache-dir -r /app/requirements.txt # create uploads dir (HuggingFace Spaces friendly /tmp usage) RUN mkdir -p /tmp/uploads && chmod 777 /tmp/uploads EXPOSE 7860 # run uvicorn on 0.0.0.0:7860 CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]