Spaces:
Sleeping
Sleeping
File size: 749 Bytes
002212a 26c14b9 002212a 299d3ff 002212a 6842961 002212a | 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 | FROM node:20 AS frontend
WORKDIR /app
COPY frontend/package*.json frontend/
RUN cd frontend && rm -f package-lock.json && npm install --include=optional --no-audit --no-fund
COPY frontend frontend
RUN cd frontend && npm run build
FROM python:3.11-slim
WORKDIR /app
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV FRONTEND_BASE_URL=http://localhost:7860
RUN apt-get update \
&& apt-get install -y --no-install-recommends git \
&& rm -rf /var/lib/apt/lists/*
COPY server/requirements.txt server/requirements.txt
RUN pip install --no-cache-dir -r server/requirements.txt
COPY server server
COPY --from=frontend /app/frontend/dist frontend/dist
EXPOSE 7860
CMD ["uvicorn","server.app.main:app","--host","0.0.0.0","--port","7860"]
|