Skip to content

Standalone executable distribution of Apple's ml-sharp for zero-dependency deployment

License

Notifications You must be signed in to change notification settings

spacedriveapp/ml-sharp-dist

Repository files navigation

ml-sharp-distribution

Standalone executable distribution of Apple's ml-sharp for zero-dependency deployment in Spacedrive.

Overview

This repository builds platform-specific standalone executables of ml-sharp using PyInstaller, enabling runtime download without requiring users to install Python or manage dependencies.

Supported Platforms

  • macOS ARM64 (Apple Silicon)
  • macOS x64 (Intel)
  • Windows x64
  • Linux x64

Build Artifacts

Each platform produces a compressed archive containing:

  • sharp or sharp.exe - Standalone executable with bundled PyTorch and dependencies
  • .sha256 - Checksum file for integrity verification

Expected sizes:

  • macOS ARM64: ~700 MB (executable only)
  • macOS x64: ~750 MB
  • Windows x64: ~800 MB
  • Linux x64: ~700 MB

Local Build

Prerequisites

  • Python 3.11+
  • Git

Build for Current Platform

python scripts/build.py

Artifacts will be created in dist/:

  • Executable: dist/sharp (or sharp.exe)
  • Archive: dist/sharp-{platform}.tar.gz (or .zip for Windows)
  • Checksum: dist/sharp-{platform}.sha256

Test Built Executable

# macOS/Linux
./dist/sharp --help
./dist/sharp predict --help

# Windows
.\dist\sharp.exe --help

CI/CD

GitHub Actions automatically builds for all platforms on tag push:

git tag v0.1.0
git push origin v0.1.0

Workflow creates a draft release with all platform artifacts.

Integration with Spacedrive

Spacedrive's model download system fetches executables from:

https://github.com/spacedriveapp/ml-sharp-dist/releases/latest/download/sharp-{platform}.{tar.gz|zip}

The executable is stored in {data_dir}/models/sharp/ alongside the model weights.

Size Optimizations

  • CPU-only PyTorch (excludes CUDA/ROCm)
  • Excluded modules: tests, docs, notebooks, CUDA libs
  • UPX compression (Windows/Linux)
  • Debug symbol stripping

License

This distribution tool is MIT licensed. The ml-sharp project and model weights are subject to Apple's original license terms.

About

Standalone executable distribution of Apple's ml-sharp for zero-dependency deployment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages