Spaces:
Sleeping
Sleeping
File size: 602 Bytes
353a28d 856713d | 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 | FROM node:20-bookworm-slim AS frontend-builder
WORKDIR /frontend
COPY pwa-app/package*.json ./
RUN npm ci
COPY pwa-app/ ./
RUN npm run build
FROM python:3.12-slim
WORKDIR /app
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PORT=7860
ENV PWA_DIST_DIR=/app/pwa-app/dist
COPY requirements.txt ./
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
COPY . ./
COPY --from=frontend-builder /frontend/dist /app/pwa-app/dist
EXPOSE 7860
CMD ["sh", "-c", "python ensure_hf_assets.py || true; python -m uvicorn api:app --host 0.0.0.0 --port 7860"]
|