# Use lightweight Python base | |
FROM python:3.10-slim | |
WORKDIR /app | |
RUN apt-get update && apt-get install -y eatmydata && eatmydata apt-get install -y --no-install-recommends build-essential | |
# Install Python dependencies | |
COPY requirements.txt . | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Copy application files | |
COPY . . | |
# Set environment variables | |
ENV MODEL_PATH="./kai-model-7.2B-Q4_0.gguf" | |
ENV GUARDRAILS_PATH="./config" | |
EXPOSE 8000 | |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] | |