fix(plant_all): default cascor conda env to JuniperCascor1 (unblock /v1/health)#237
Merged
fix(plant_all): default cascor conda env to JuniperCascor1 (unblock /v1/health)#237
Conversation
The legacy ``JuniperCascor`` env (Python 3.14.3 + torch 2.9.1) cannot
import torch — the wheel ships a stub-only ``torch/_C/`` namespace
package that shadows ``_C.cpython-314-x86_64-linux-gnu.so``, so
``api/app.py`` dies on its first ``import torch`` and ``server.py``
never binds to port 8201. ``juniper_plant_all.bash`` then loops on
``/v1/health`` until ``HEALTH_CHECK_TIMEOUT`` expires.
Mirror the existing ``JUNIPER_CANOPY_CONDA`` pattern:
- ``JUNIPER_CASCOR_CONDA`` now defaults to ``JuniperCascor1``
(Python 3.13.13 + torch 2.11.0+cu130, correct wheel layout) and is
overridable for users with a known-good legacy env.
- ``JUNIPER_WORKER_CONDA`` is also made overridable but stays at
``JuniperCascor`` because that is where the
``juniper-cascor-worker`` pip wheel currently lives. Once the worker
is also installed in ``JuniperCascor1`` the worker default can flip
too and the legacy env can be retired.
Verified: ``server.py`` boots cleanly under ``JuniperCascor1`` and
``curl http://localhost:8201/v1/health`` returns
``{"status":"ok","version":"0.4.0"}``.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Captures the diagnosis behind the previous commit: the torch 2.9.1
wheel under Python 3.14 ships a stub-only ``_C/`` directory that
shadows ``_C.cpython-314-...so`` via PEP 420 implicit namespace
packages, which is why ``api/app.py``'s ``import torch`` fails the
moment the cascor server starts.
Also documents the matching activate.d/deactivate.d hooks added to
both ``JuniperCascor`` and ``JuniperCascor1`` to strip the
rust_mudgeon ``LIBTORCH`` / ``LD_LIBRARY_PATH`` bleed-through (mirrors
the ``JuniperCanopy1`` pattern). Those hooks live outside the repo
under ``/opt/miniforge3/envs/<env>/etc/conda/{activate,deactivate}.d/``.
Lists the remaining follow-ups (install worker into JuniperCascor1,
rebuild torch in JuniperCascor, etc.) so the env split does not become
permanent without a decision.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Overtoad <paul.calnon@gmail.com>
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
Fixes the immediate
./util/juniper_plant_all.bashfailure where thejuniper-cascorserver never returned success on its/v1/healthprobe — the cascor process was dying at import time inside the legacy
JuniperCascorconda env (Python 3.14.3 + torch 2.9.1) before itcould bind to port 8201.
fix(plant_all): default cascor conda env to JuniperCascor1util/juniper_plant_all.bashJuniperCascortorch 2.9.1 wheel ships a stub-onlytorch/_C/namespace package that shadows_C.cpython-314-x86_64-linux-gnu.so;import torchfails immediately.JuniperCascor1(Py 3.13 + torch 2.11.0) has the correct layout. Mirrors the existingJUNIPER_CANOPY_CONDApattern;JUNIPER_WORKER_CONDAmade overridable too.docs(notes): document cascor conda env fixnotes/CASCOR_CONDA_ENV_FIX_2026-05-07.mdJuniperCascor1, rebuild torch inJuniperCascor).Verification
Server boots cleanly, uvicorn binds to
localhost:8201,/v1/healthreturns 200 immediately.Out-of-repo changes (documented in the notes file)
/opt/miniforge3/envs/JuniperCascor/etc/conda/activate.d/00_isolate_from_tch_rs.sh— new/opt/miniforge3/envs/JuniperCascor/etc/conda/deactivate.d/00_restore_tch_rs.sh— newThese mirror the existing
JuniperCanopy1hooks. They do not fix the wheel-layout bug, but defend against the secondary LIBTORCH bleed-through if torch is ever reinstalled.Test plan
JuniperCascor1and/v1/healthreturns 200 (verified locally above)./util/juniper_plant_all.bashand observe cascor health probe succeeding🤖 Generated with Claude Code