frankscore-model / Dockerfile
Gutema-1990
the model artifact is removed to be deployed separately
97b9b33
raw
history blame contribute delete
565 Bytes
FROM python:3.12.12 AS builder
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1
WORKDIR /app
RUN python -m venv .venv
COPY requirements.txt ./
RUN .venv/bin/pip install -r requirements.txt
FROM python:3.12.12-slim
WORKDIR /app
# Native libs required by xgboost / scikit-learn wheels
RUN apt-get update \
&& apt-get install -y --no-install-recommends libgomp1 libopenblas0-pthread \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/.venv .venv/
COPY . .
CMD ["/app/.venv/bin/uvicorn", "api.app:app", "--host", "0.0.0.0", "--port", "7860"]