Repository navigation
Template 0.1.22: TensorFlow apps install on Windows with an NVIDIA GPU; version cell finds the notebook - #39
Merged
Conversation
…eads the grouped version file The GPU requirements file rewrote tensorflow to tensorflow[and-cuda] for every system. The extra lists Linux-only nvidia-* wheels without a platform marker, so the universal GPU lock pinned them for Windows too and pip failed on every Windows computer with an NVIDIA driver (post_install.bat picks the GPU file). The GPU file now has tensorflow[and-cuda] for sys_platform == "linux" and plain tensorflow elsewhere. The version cell snippet in notebook_upload.md looked the notebook up at the top level of notebook_latest_versions.yaml, which is grouped by folder, so Colab users always read "not listed". Migration 0.1.21 -> 0.1.22 applies both changes surgically (idempotent, keeps line endings, skips customised files). Design note: migration_0_1_22.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WX6rdRdA72nsUjZvTXFSbP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
1. On Windows computers with an NVIDIA driver, TensorFlow apps fail to install.
How it happens:
post_install.batinstallsrequirements_gpu.lock.txtwhenever it findsnvidia-smi.merge_requirements.pyrewrotetensorflowtotensorflow[and-cuda]for every system.nvidia-*packages with no platform marker, and some of them only have Linux wheels (nvidia-nccl-cu12has never had a Windows wheel).pipreports "No matching distribution", and the installer stops with "Application requirements installation failed".The fix: in the GPU file,
tensorflownow becomes two lines:tensorflow[and-cuda]==X ; sys_platform == "linux"tensorflow==X ; sys_platform != "linux"If the line already has a marker, it is kept and combined with
and. TensorFlow has had no native Windows GPU build since 2.10, so Windows loses nothing.2. The version-cell snippet (
notebook_upload.md) always printed "not listed" on Colab. It looked the notebook up at the top level ofnotebook_latest_versions.yaml, butsync_notebook_versions.pywrites that file grouped by folder. The snippet now looks inside the folder groups.Migration 0.1.21 → 0.1.22 applies both changes to existing apps:
Found while planning a StarDist 2D (TensorFlow 2.20) LabConstrictor app.
Evidence
GPU lock for a StarDist stack (TF 2.20, Python 3.12), checked with
uv pip install --dry-run --python-platform ...:nvidia-*nvidia-*(every one markedsys_platform == 'linux')Tests
python -m pytest tests -q: 235 passed, 246 subtests passed.tests/test_template_sync_0_1_22.pycovers:sync.pychain.test_template_sync_0_1_21.py: the manifest-version check now accepts any later version, and its chain test pins its copy of the manifest to 0.1.21. This is the same pattern the 0.1.20 test uses.ruff checkandmypyare clean.Checklist
.tools/docs/notebook_upload.md(snippet),.tools/docs/notebook_requirements.md(what the GPU file does for TensorFlow), the new.tools/docs/migration_0_1_22.md, and a link in.tools/docs/README.md.template_versionto 0.1.22. Users must regenerate the GPU lock and release a new installer.Generated by Claude Code