Spaces:
Sleeping
Sleeping
File size: 764 Bytes
17ab777 |
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 |
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"]
|