Spaces:
Runtime error
Runtime error
FROM node:20-alpine AS builder | |
RUN apk add --no-cache libc6-compat | |
WORKDIR /app | |
# Install dependencies based on the preferred package manager | |
COPY frontend . | |
RUN npm i | |
RUN npm run build | |
RUN ls -al | |
FROM python:3.10-slim AS backend | |
WORKDIR /app | |
# RUN apt-get update && apt-get install --no-install-recommends -y \ | |
# git ffmpeg curl gnupg \ | |
# && apt-get clean && rm -rf /var/lib/apt/lists/* | |
# RUN useradd -m -u 1000 user | |
COPY ./requirements.txt . | |
RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt | |
EXPOSE 5000 | |
# USER user | |
# ENV HOME=/home/user \ | |
# PATH=/home/user/.local/bin:$PATH | |
WORKDIR /app | |
COPY --from=builder /app/build ./static | |
COPY . . | |
# RUN export HF_HOME=${HOME}/cache | |
RUN export TRANSFORMERS_CACHE=/generate/cache/ | |
CMD ["python", "app.py"] | |