Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package exo as installable #354

Closed
wants to merge 120 commits into from

Conversation

josh1593
Copy link
Contributor

@josh1593 josh1593 commented Oct 16, 2024

implementation uses nuitka to compile python to C and create an executable.

@AlexCheema
Copy link
Contributor

For reference, since we talked on X. Here are the issues I encountered:

  • link to exo-logo.icns is wrong
  • python3.11 is hardcoded
  • get this error (not sure how to fix -- we do want static linking, not dynamic linking): FATAL: Automatic detection of static libpython failed. Homebrew Python is unexpectedly broken. Disable with '--static-libpython=no' if you don't want to install it.

@AlexCheema
Copy link
Contributor

Still getting this error:

(.venv) $ python3 build/build_exo.py 
Nuitka-Options: Used command line options: exo/main.py --company-name=exolabs --output-dir=dist --follow-imports --standalone --output-filename=exo
Nuitka-Options: --macos-app-name=exo --macos-app-mode=gui --macos-app-version=0.0.1 --product-name=exo --macos-create-app-bundle
Nuitka-Options: --macos-app-icon=docs/exo-logo.icns --include-distribution-meta=pygments --include-distribution-meta=mlx --include-module=mlx._reprlib_fix
Nuitka-Options: --include-module=mlx._os_warning --include-data-files=./.venv/lib/python3.12/site-packages/mlx/lib/mlx.metallib=mlx/lib/mlx.metallib
Nuitka-Options: --include-data-dir=exo/tinychat=tinychat --include-module=exo.inference.mlx.models.llama
Nuitka-Options: --include-module=exo.inference.mlx.models.deepseek_v2 --include-module=exo.inference.mlx.models.base
Nuitka-Options: --include-module=exo.inference.mlx.models.llava --include-module=exo.inference.mlx.models.qwen2
FATAL: Automatic detection of static libpython failed. Homebrew Python is unexpectedly broken. Disable with '--static-libpython=no' if you don't want to install it.
An error occurred: Command '['python3', '-m', 'nuitka', 'exo/main.py', '--company-name=exolabs', '--output-dir=dist', '--follow-imports', '--standalone', '--output-filename=exo', '--macos-app-name=exo', '--macos-app-mode=gui', '--macos-app-version=0.0.1', '--product-name=exo', '--macos-create-app-bundle', '--macos-app-icon=docs/exo-logo.icns', '--include-distribution-meta=pygments', '--include-distribution-meta=mlx', '--include-module=mlx._reprlib_fix', '--include-module=mlx._os_warning', '--include-data-files=./.venv/lib/python3.12/site-packages/mlx/lib/mlx.metallib=mlx/lib/mlx.metallib', '--include-data-dir=exo/tinychat=tinychat', '--include-module=exo.inference.mlx.models.llama', '--include-module=exo.inference.mlx.models.deepseek_v2', '--include-module=exo.inference.mlx.models.base', '--include-module=exo.inference.mlx.models.llava', '--include-module=exo.inference.mlx.models.qwen2']' returned non-zero exit status 1.

@josh1593
Copy link
Contributor Author

Nuitka/Nuitka#1353

exo/main.py Outdated
@@ -25,6 +28,8 @@
from exo.orchestration.node import Node
from exo.models import model_base_shards
from exo.viz.topology_viz import TopologyViz
import os
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick, but this should go up near the other non-exo imports

exo/main.py Outdated
def open_web_chat():
if web_chat_urls:
import subprocess
import os
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is already imported at the top and i think subprocess should be too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, i have made changes addressing both suggestions. thanks @dtnewman !!

@josh1593 josh1593 closed this Nov 18, 2024
@josh1593 josh1593 deleted the package-exo-as-installable branch November 18, 2024 16:59
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.

4 participants