From d2db78a84730e41b25d68f2d9c67b4c7db784f2a Mon Sep 17 00:00:00 2001 From: Paul Newling Date: Wed, 22 Apr 2026 08:32:56 -0700 Subject: [PATCH 1/2] Add python-3.12.10-scientific-slim runenv variant Bundles only polars-lts-cpu==1.33.1, numpy==2.2.6, scipy==1.15.3, and pyarrow==21.0.0 for blocks with tabular/scientific Python stacks that do not need the full ML toolchain (TensorFlow, torch, transformers, etc.) shipped by the base 3.12.10 runenv. Intended first consumer: platforma-open/titeseq-analysis, whose CI currently exhausts the ubuntu-latest runner disk while extracting the base runenv's 800 MB TensorFlow wheel. Bundled size drops from ~2.5 GB to ~100 MB, leaving ample headroom for that block's multi-block integration test. --- .changeset/scientific-slim-variant.md | 6 +++ catalogue/package.json | 6 ++- pnpm-workspace.yaml | 1 + python-3.12.10-scientific-slim/config.json | 12 ++++++ python-3.12.10-scientific-slim/package.json | 43 +++++++++++++++++++++ 5 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 .changeset/scientific-slim-variant.md create mode 100644 python-3.12.10-scientific-slim/config.json create mode 100644 python-3.12.10-scientific-slim/package.json diff --git a/.changeset/scientific-slim-variant.md b/.changeset/scientific-slim-variant.md new file mode 100644 index 0000000..37088e1 --- /dev/null +++ b/.changeset/scientific-slim-variant.md @@ -0,0 +1,6 @@ +--- +'@platforma-open/milaboratories.runenv-python-3.12.10-scientific-slim': patch +'@platforma-open/milaboratories.runenv-python-3': minor +--- + +Add `python-3.12.10-scientific-slim` runenv variant bundling only `polars-lts-cpu`, `numpy`, `scipy`, and `pyarrow`. Intended for blocks with tabular/scientific Python stacks that do not need the full ML toolchain (TensorFlow, torch, transformers, etc.) shipped by the base `3.12.10` runenv. Bundled size is ~100 MB vs. the base runenv's ~2.5 GB. diff --git a/catalogue/package.json b/catalogue/package.json index 45a5096..aacffe1 100644 --- a/catalogue/package.json +++ b/catalogue/package.json @@ -29,6 +29,9 @@ }, "3.12.10-parapred": { "reference": "@platforma-open/milaboratories.runenv-python-3.12.10-parapred/dist/tengo/software/main.sw.json" + }, + "3.12.10-scientific-slim": { + "reference": "@platforma-open/milaboratories.runenv-python-3.12.10-scientific-slim/dist/tengo/software/main.sw.json" } } }, @@ -42,7 +45,8 @@ "@platforma-open/milaboratories.runenv-python-3.12.10-sccoda": "workspace:*", "@platforma-open/milaboratories.runenv-python-3.12.10-rapids": "workspace:*", "@platforma-open/milaboratories.runenv-python-3.12.10-h5ad": "workspace:*", - "@platforma-open/milaboratories.runenv-python-3.12.10-parapred": "workspace:*" + "@platforma-open/milaboratories.runenv-python-3.12.10-parapred": "workspace:*", + "@platforma-open/milaboratories.runenv-python-3.12.10-scientific-slim": "workspace:*" }, "devDependencies": { "@platforma-sdk/package-builder": "catalog:" diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 45c4068..a324e36 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -7,6 +7,7 @@ packages: - python-3.12.10-rapids - python-3.12.10-h5ad - python-3.12.10-parapred + - python-3.12.10-scientific-slim - catalogue catalog: diff --git a/python-3.12.10-scientific-slim/config.json b/python-3.12.10-scientific-slim/config.json new file mode 100644 index 0000000..601a9f6 --- /dev/null +++ b/python-3.12.10-scientific-slim/config.json @@ -0,0 +1,12 @@ +{ + "packages": { + "dependencies": [ + "polars-lts-cpu==1.33.1", + "numpy==2.2.6", + "scipy==1.15.3", + "pyarrow==21.0.0" + ], + "skip": {}, + "platformSpecific": {} + } +} diff --git a/python-3.12.10-scientific-slim/package.json b/python-3.12.10-scientific-slim/package.json new file mode 100644 index 0000000..a092b2a --- /dev/null +++ b/python-3.12.10-scientific-slim/package.json @@ -0,0 +1,43 @@ +{ + "name": "@platforma-open/milaboratories.runenv-python-3.12.10-scientific-slim", + "version": "1.0.0", + "description": "Python 3.12.10 run environment bundling polars-lts-cpu, numpy, scipy, and pyarrow for scientific/tabular workloads", + "scripts": { + "cleanup": "rm -rf ./pkg-*.tgz ./pydist ./dist/ ./build/", + "reset": "pnpm run cleanup && rm -rf ./node_modules ./.turbo", + "build": "pl-py-builder", + "after-prebuild": "pl-pkg publish packages", + "before-publish": "pl-pkg prepublish" + }, + "files": [ + "dist/" + ], + "block-software": { + "entrypoints": { + "main": { + "environment": { + "artifact": { + "type": "environment", + "runtime": "python", + "registry": "platforma-open", + "python-version": "3.12.10", + "roots": { + "linux-x64": "./pydist/linux-x64", + "linux-aarch64": "./pydist/linux-aarch64", + "macosx-x64": "./pydist/macosx-x64", + "macosx-aarch64": "./pydist/macosx-aarch64", + "windows-x64": "./pydist/windows-x64" + }, + "binDir": "bin" + } + } + } + } + }, + "license": "UNLICENSED", + "devDependencies": { + "@platforma-sdk/package-builder": "catalog:", + "runenv-python-builder": "workspace:*", + "tsx": "catalog:" + } +} From bff45ce623a853f10521097c22c6d2471f59bcf2 Mon Sep 17 00:00:00 2001 From: Paul Newling Date: Wed, 22 Apr 2026 08:42:53 -0700 Subject: [PATCH 2/2] Update pnpm-lock.yaml for scientific-slim variant --- pnpm-lock.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2884034..8cf9440 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -77,6 +77,9 @@ importers: '@platforma-open/milaboratories.runenv-python-3.12.10-sccoda': specifier: workspace:* version: link:../python-3.12.10-sccoda + '@platforma-open/milaboratories.runenv-python-3.12.10-scientific-slim': + specifier: workspace:* + version: link:../python-3.12.10-scientific-slim devDependencies: '@platforma-sdk/package-builder': specifier: 'catalog:' @@ -166,6 +169,18 @@ importers: specifier: 'catalog:' version: 4.20.6 + python-3.12.10-scientific-slim: + devDependencies: + '@platforma-sdk/package-builder': + specifier: 'catalog:' + version: 3.10.7 + runenv-python-builder: + specifier: workspace:* + version: link:../builder + tsx: + specifier: 'catalog:' + version: 4.20.6 + packages: '@aws-crypto/crc32@5.2.0': @@ -1528,6 +1543,7 @@ packages: tar@7.4.3: resolution: {integrity: sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==} engines: {node: '>=18'} + deprecated: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me term-size@2.2.1: resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==}