INNER CODE UNIT · Python

_install_line

omnirexflora-labs/omnicoreagent · src/omnicoreagent/serve/cli.py:448

def _install_line() -> str:
    """The release that generated the Dockerfile, pinned (the 0.5.0rc3 gate: it
    installed whatever was newest). A development build is not on the index."""
    import re

    current = _package_version()
    extras = "# Add the extras your agent uses, e.g. [serve,postgres] for SQL memory.\n"
    if re.fullmatch(r"\d+\.\d+\.\d+((a|b|rc)\d+)?", current):
        return extras + f'RUN pip install --no-cache-dir "omnicoreagent[serve]=={current}"'
    return extras + (
        f"# Generated by development build {current}, which is not on the index;\n"
        "# pin the release you deploy.\n"
        'RUN pip install --no-cache-dir "omnicoreagent[serve]"'
    )


def _build_dockerfile_content(agent_path: str) -> str:
    """Build the OmniServe Dockerfile content."""

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…