Spaces:
Sleeping
Sleeping
File size: 719 Bytes
b8ea7be 1a0f261 b8ea7be 1a0f261 b8ea7be 1a0f261 b8ea7be 1a0f261 b8ea7be 1a0f261 b8ea7be 1a0f261 b8ea7be 1a0f261 2a3c1c9 9cc9c56 1a0f261 2a3c1c9 1a0f261 b8ea7be 1a0f261 aee3c61 b8ea7be | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | # ---------- Frontend Build ----------
FROM node:18 AS frontend-builder
WORKDIR /app/frontend
COPY frontend/package*.json ./
RUN npm install
COPY frontend/ .
RUN npm run build
# ---------- Backend ----------
FROM python:3.10-slim
WORKDIR /app
RUN apt-get update && \
apt-get install -y git && \
rm -rf /var/lib/apt/lists/*
RUN pip install --upgrade pip
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN python -c "import numpy; import faiss; print(numpy.__version__)"
COPY backend ./backend
COPY --from=frontend-builder /app/frontend/dist ./frontend/dist
EXPOSE 7860
ENV PYTHONPATH=/app/backend
CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860"] |