Spaces:
Running
Running
| FROM node:20-slim AS frontend-build | |
| ARG FRONTEND_BUILD_BUST=grounded-chat-v1 | |
| WORKDIR /app/frontend | |
| COPY frontend/package.json ./ | |
| RUN npm install | |
| COPY frontend/ ./ | |
| RUN npm run build | |
| FROM python:3.11-slim | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV PORT=7860 | |
| WORKDIR /app | |
| RUN apt-get update \ | |
| && apt-get install -y --no-install-recommends build-essential git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt ./ | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY app ./app | |
| COPY scripts ./scripts | |
| COPY README.md ./ | |
| COPY --from=frontend-build /app/frontend/dist ./frontend/dist | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app.api.main:app", "--host", "0.0.0.0", "--port", "7860"] | |