Spaces:
Sleeping
Sleeping
Download Dockerfile from t4transaction/agent: direct link, hf CLI and curl.
- Browser
- Download file 687 Bytes
-
https://huggingface.co/spaces/t4transaction/agent/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/t4transaction/agent/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/t4transaction/agent/resolve/main/Dockerfile
687 Bytes
| # ---------- Frontend build ---------- | |
| FROM node:22-alpine AS frontend-builder | |
| WORKDIR /app/frontend | |
| COPY frontend/package.json ./ | |
| RUN npm install | |
| COPY frontend ./ | |
| RUN npm run build | |
| # ---------- Backend runtime ---------- | |
| FROM python:3.12-slim AS runtime | |
| WORKDIR /app | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| COPY backend/requirements.txt ./backend/requirements.txt | |
| RUN pip install --no-cache-dir -r ./backend/requirements.txt | |
| COPY backend ./backend | |
| COPY --from=frontend-builder /app/frontend/out ./backend/static | |
| RUN useradd -m -u 1000 user && chown -R user:user /app | |
| USER user | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860"] | |