Spaces:
Running
Running
File size: 770 Bytes
78046e4 | 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 36 37 38 | # syntax=docker/dockerfile:1
FROM node:20-slim AS ui-build
WORKDIR /app/ui
COPY ui/package*.json ./
RUN npm ci
COPY ui/ ./
RUN npm run build
FROM python:3.11-slim AS app
ENV PYTHONUNBUFFERED=1 \
PORT=7860
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends build-essential curl \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt \
&& python -m spacy download en_core_web_sm
COPY config/ ./config/
COPY src/ ./src/
COPY scripts/ ./scripts/
COPY sample_data/ ./sample_data/
COPY --from=ui-build /app/ui/dist ./ui/dist
RUN mkdir -p output/sessions output/debug
EXPOSE 7860
CMD ["sh", "-c", "uvicorn api:app --app-dir src --host 0.0.0.0 --port ${PORT:-7860}"]
|