Skip to content

Needed to Make a Few Python 3.8 Changes for Xavier on 20.04 for llama-server container #1724

Description

@DennisFaucher

opencode helped me with this

Python 3.8 Backport Fixes

Commit: f273011

  1. jetson_containers/network.py:66 — @functools.cache → @functools.lru_cache(maxsize=None)

    @functools.cache was added in Python 3.9. On Python 3.8 this would raise
    AttributeError. Replaced with @functools.lru_cache(maxsize=None) which is
    functionally equivalent and works on Python 3.8+.

    Before:
    @functools.cache
    def github_api(url: str):

    After:
    @functools.lru_cache(maxsize=None)
    def github_api(url: str):

  2. jetson_containers/packages.py:126-130 — Disable parallel threading on Python 3.8

    Parallel package scanning caused an unknown spin condition (hang) on Python 3.8.
    Threading is now only enabled when Python > 3.8.

    Code added:
    # disable parallel scan on python 3.8 due to unknown spin condition
    THREADING = (
    Version(f'{sys.version_info.major}.{sys.version_info.minor}')
    > Version('3.8')
    )


Also, the llama-server in the container is too old to support gemma4 so I had to use gemma2
llama-server --host 0.0.0.0 -ngl 9999 --hf-repo bartowski/gemma-2-9b-it-GGUF --hf-file gemma-2-9b-it-Q4_K_M.gguf

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions