FROM ghcr.io/glissemantv/mcpo:main

COPY requirements.txt /tmp/requirements.txt

RUN /app/.venv/bin/python -m ensurepip --upgrade && \
    /app/.venv/bin/python -m pip install --upgrade pip && \
    /app/.venv/bin/python -m pip install --no-cache-dir -r /tmp/requirements.txt

RUN mkdir -p /rootPath
COPY config.json /rootPath
COPY tools /rootPath/tools
COPY templates /rootPath/templates
COPY functions /rootPath/functions

ENTRYPOINT []
CMD mcpo --type http --host 0.0.0.0 --port 8000 --config /rootPath/config.json