FROM python:3.12-slim
# Install Node + Claude Code CLI so manual/claude_cli backend works in-container.
# npm is kept (not purged) to avoid sweeping /usr/lib/node_modules global installs.
RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm \
    && npm install -g @anthropic-ai/claude-code \
    && npm cache clean --force \
    && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY . .
RUN pip install --no-cache-dir -e ".[ui]"
EXPOSE 16666
CMD ["uvicorn", "karyab.ui.app:app", "--host", "0.0.0.0", "--port", "16666"]
