AgentToolStore / Dockerfile
ToolStore Agent
Prepare for HF Spaces deployment: root Dockerfile, persistent /data volume, YAML frontmatter
0af822c
Raw
History Blame Contribute Delete
1.06 kB
# ── Hugging Face Spaces Dockerfile ──────────────────────────────────────
#
# HF Spaces requirements:
# β€’ Container runs as user ID 1000
# β€’ App must listen on port 7860
# β€’ Dockerfile must be at repo root
#
# The server code lives in server/; this Dockerfile builds from there.
# ──────────────────────────────────────────────────────────────────────────
FROM python:3.11-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
COPY --chown=user server/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY --chown=user server/ .
EXPOSE 7860
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]