embedding-runtime/Dockerfile

14 lines
697 B
Docker

# apps/embedding-runtime/Dockerfile
# SmartMLOps Tier-2 embedding-runtime — OpenAI-compatible embeddings/rerank server.
# KServe owns lifecycle (ClusterServingRuntime container); we own only this serving code.
FROM python:3.11-slim
ENV PIP_DISABLE_PIP_VERSION_CHECK=1 \
HF_HUB_DISABLE_TELEMETRY=1 \
PYTHONUNBUFFERED=1
WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN --mount=type=cache,target=/root/.cache/pip pip install -r /app/requirements.txt
COPY server.py /app/server.py
EXPOSE 8080
# KServe mounts the model artifact at /mnt/models; server.py reads EMBEDDING_MODEL_DIR (default /mnt/models).
ENTRYPOINT ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "8080"]