UAIDE / Dockerfile
ATS-27's picture
Upload folder using huggingface_hub
bcc30e9 verified
Raw
History Blame Contribute Delete
904 Bytes
FROM node:20-bullseye AS frontend-builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY index.html vite.config.js ./
COPY public ./public
COPY src ./src
RUN npm run build
FROM python:3.11-slim-bullseye
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
PORT=7860
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
libgl1 \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender1 \
git \
&& rm -rf /var/lib/apt/lists/*
COPY backend/requirements.txt /app/backend/requirements.txt
RUN pip install --upgrade pip && pip install -r /app/backend/requirements.txt opencv-python-headless scipy scikit-image scikit-learn matplotlib joblib
COPY . /app
COPY --from=frontend-builder /app/dist /app/dist
EXPOSE 7860
CMD ["python", "-m", "uvicorn", "backend.model_service:app", "--host", "0.0.0.0", "--port", "7860"]