Deployment
Automated deployment update
4b1daed
Raw
History Blame Contribute Delete
805 Bytes
# Embedding Service Dockerfile
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Pre-download the model
RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')"
# Copy application
COPY app/ ./app/
# Expose port
EXPOSE 8090
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD python -c "import httpx; httpx.get('http://localhost:8090/health')" || exit 1
# Run
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8090"]