Spaces:
Running
Running
FROM python:3.9-slim | |
RUN useradd -m -u 1000 user | |
RUN apt-get update && apt-get install -y curl && \ | |
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \ | |
apt-get install -y nodejs && \ | |
apt-get clean && rm -rf /var/lib/apt/lists/* | |
USER user | |
ENV PATH="/home/user/.local/bin:$PATH" | |
WORKDIR /app | |
COPY --chown=user package*.json ./ | |
RUN npm ci | |
COPY --chown=user . . | |
RUN npm run build | |
EXPOSE 7860 | |
CMD ["python", "-m", "http.server", "7860", "--directory", "dist"] |