Skip to content

Conversation

@JonnyTran
Copy link

@JonnyTran JonnyTran commented Jan 27, 2025

This PR includes significant improvement to the Python build process, transitioning from using apt-get to Micromamba for easier python environment management (see #796). The key changes involve using Micromamba to install Python along with pip and uv at the /opt/conda/ Python environment path, instead of the system Python installation. This allows uv as drop-in replacement to replace pip for much faster builds and better extensibility to other projects. All current code using pip3 install has been tested to still work with the CUDA pip cache.

Transition to Micromamba:

  • packages/build/python/Dockerfile: Updated to install core python, uv, and pip in a conda environment. Added environment variables for Micromamba binary and Conda Python environment path for uv.
  • packages/build/python/install.sh: Replaced apt-get commands with Micromamba commands for installing Python and core packages. Added Micromamba initialization to /etc/profile.d for all shells and created symbolic links for python and pip.
  • Optimizing uv in containers by compiling bytecode
  • Remove all apt-get install of python-* packages
  • Upgrade pip3 install to uv pip install in other containers (optional)

@johnnynunez
Copy link
Collaborator

@JonnyTran thanks for the PR.
Also consider that not all libraries support conda and we are not really happy with that.
For example, jetson-utils or nano-llm

@ms1design
Copy link
Collaborator

Oh I like this I wanted also to introduce the uv here. We should make sure that it will not inference with the local PYPI server settings.

you added 3 commits April 20, 2025 00:10
…ate2, and onnxruntime; modified error handling in homeassistant-base; adjusted ONNXRUNTIME_DIR in piper-tts Dockerfile.
@JonnyTran
Copy link
Author

Hi all! Seems like this is getting stale, I'll close this if conda python envs are a no-go for jetson

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants