Spaces:
Sleeping
Sleeping
Download Dockerfile from Clare-AI/test_AI_Agent: direct link, hf CLI and curl.
- Browser
- Download file 755 Bytes
-
https://huggingface.co/spaces/Clare-AI/test_AI_Agent/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Clare-AI/test_AI_Agent/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Clare-AI/test_AI_Agent/resolve/main/Dockerfile
755 Bytes
| # ========================= | |
| # 1) Web build stage | |
| # ========================= | |
| FROM node:20-slim AS web_builder | |
| WORKDIR /web | |
| COPY web/package*.json ./ | |
| RUN npm install | |
| COPY web/ ./ | |
| RUN npm run build # -> outputs /web/build (per your log) | |
| # ========================= | |
| # 2) API runtime stage | |
| # ========================= | |
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # ---- Python deps ---- | |
| COPY requirements.txt /app/requirements.txt | |
| RUN pip install --no-cache-dir -r /app/requirements.txt | |
| # ---- Copy API source ---- | |
| COPY api/ /app/api/ | |
| # ---- Copy built web assets ---- | |
| COPY --from=web_builder /web/build /app/web/build | |
| # ---- Run API (serves web build too) ---- | |
| ENV PORT=7860 | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "api.server:app", "--host", "0.0.0.0", "--port", "7860"] | |