[project] name = "libratory-runtime" version = "0" requires-python = "==3.12.*" dependencies = [ "marker-pdf==1.10.2", "surya-ocr==0.17.1", "kokoro==0.9.4", "misaki==0.9.4", "soundfile==0.13.1", "numpy==1.26.4", # 2.12+ ships macosx_14_0 wheels only. The desktop app's MIN_MACOS, the cask's depends_on and the # README all say macOS 14 because of this line; a bump that changes the wheel tags changes them. "torch==2.13.0", "setuptools>=83.0.0", "transformers==4.57.6", "regex==2024.11.6", "FlagEmbedding==1.4.0", "huggingface_hub==0.36.2", "pypdf==6.21.4", # scipy 1.18 requires numpy>=2 at runtime while declaring a looser bound, so a resolver picks it # happily and then transformers' model registry comes up half empty. 1.17 is the last numpy-1 one. "scipy==1.17.0", # misaki's English G2P calls spacy.cli.download() at synthesis time when this is absent — a # network fetch in the middle of a job, on a machine that may be offline. Declared instead. "en-core-web-sm", "platformdirs", # misaki[zh] G2P chain for Kokoro's Mandarin voices — pure Python. "cn2an==0.5.24", "jieba==0.42.1", "ordered-set==4.1.0", "proces==0.1.7", "pypinyin==0.55.0", ] [tool.uv.sources] en-core-web-sm = { url = "https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.8.0/en_core_web_sm-3.8.0-py3-none-any.whl" } # PyPI's Linux torch is the CUDA build — a 532 MB wheel towing ~3 GB of nvidia-* packages that a # CPU-only server never loads. The cpu index serves the same torch without the freight; a Linux box # with an NVIDIA card points this at /whl/cu130 instead and re-locks. macOS keeps PyPI either way. torch = [ { index = "pytorch-cpu", marker = "sys_platform == 'linux'" }, ] [tool.uv] override-dependencies = [ # Marker/Surya still cap Pillow at <11, including their latest releases. The image operations # used here are compatible with 13 (none of its removed APIs are called); 13.0 closes the October # 2026 parser and memory-safety advisories, which have no 12.x fix. "pillow==13.0.0", ] [[tool.uv.index]] name = "pytorch-cpu" url = "https://download.pytorch.org/whl/cpu" # explicit: only packages routed here by [tool.uv.sources] may use it — everything else stays PyPI. explicit = true