it_value_check / Dockerfile
5minbetter's picture
Deploy to Hugging Face
cc7330c
raw
history blame contribute delete
726 Bytes
FROM node:20-slim AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM python:3.10-slim
RUN apt-get update && apt-get install -y \
fontconfig \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install custom fonts
COPY core/data/*.ttf /usr/share/fonts/truetype/
RUN fc-cache -f -v
# Create a non-root user required by Hugging Face Spaces
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY --chown=user . .
COPY --from=builder --chown=user /app/out ./out
EXPOSE 7860
CMD ["uvicorn", "core.api:app", "--host", "0.0.0.0", "--port", "7860"]