Spaces:
Running
Running
| # Build Frontend | |
| FROM node:20-slim AS build-frontend | |
| WORKDIR /app/frontend | |
| COPY frontend/package*.json ./ | |
| RUN npm install | |
| COPY frontend/ ./ | |
| RUN npm run build | |
| # Run Backend | |
| FROM python:3.10-slim | |
| WORKDIR /app | |
| # Install system dependencies for sentence-transformers/chromadb | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| # Copy built frontend from stage 1 | |
| COPY --from=build-frontend /app/frontend/dist /app/frontend/dist | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |