File size: 795 Bytes
2159212 3b2e747 2159212 | 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 | FROM node:20-slim AS frontend-build
WORKDIR /app/frontend
COPY frontend/package*.json ./
RUN npm ci
COPY frontend ./
RUN npm run build
FROM python:3.11-slim
RUN useradd -m -u 1000 user && mkdir -p /data && chmod 777 /data
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH \
HF_ANNOTATIONS_DATASET=adinayak/t2av_eval_annotations \
HF_ANNOTATIONS_DATASET_PRIVATE=true
WORKDIR $HOME/app
COPY --chown=user backend/requirements.txt backend/requirements.txt
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r backend/requirements.txt
COPY --chown=user backend backend
COPY --from=frontend-build --chown=user /app/frontend/dist frontend/dist
EXPOSE 7860
CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860"]
|