dinox
dinox is a JAX implementation of Reduced Basis Derivative Informed Neural Operators, built for high performance in single-GPU environments where all training data fits in GPU memory.
The library is designed primarily for PDE learning workflows based on:
FEniCS 2019.1- Jacobians computed via
hippylib - Subspace methods provided by
bayesflux
Overview
dinox provides:
- Reduced basis neural operator architectures
- Derivative-informed training using PDE Jacobians
- GPU-accelerated implementations in
JAXandEquinox - Integration with FEniCS-discretized PDEs
Getting Started
See the hyperelasticity tutorial for a complete walkthrough of the RB-DINO pipeline: problem setup, data generation, training with L2 vs H1 loss, and surrogate evaluation.
Important: FEniCS & Hippylib Environment Required
dinox depends on bayesflux[hippylib], which requires:
- hippylib
- FEniCS 2019.1
FEniCS has system-level dependencies and cannot be installed via pip alone.
You must first create a conda environment with FEniCS 2019.1 before installing dinox.
Installation
Prerequisites
- NVIDIA driver >= 525 (check with
nvidia-smi) - conda or mamba
Note on CUDA libraries: You do not need to install CUDA Toolkit, cuDNN, or cuSPARSE via conda or your system package manager. The pip wheels for JAX and CuPy bundle their own CUDA 12 runtime libraries. Installing system CUDA alongside pip-bundled CUDA is the most common source of GPU detection failures.
Step 1 — Create a FEniCS 2019.1 environment
conda create -n fenics-2019.1_env -c conda-forge fenics==2019.1.0 python=3.11
conda activate fenics-2019.1_env
Step 2 — Fix LD_LIBRARY_PATH (critical for GPU)
A system-level or conda-set LD_LIBRARY_PATH pointing to a CUDA installation will conflict with the CUDA libraries bundled in the JAX and CuPy pip wheels, causing errors like Unable to load cuSPARSE.
unset LD_LIBRARY_PATH
Step 3 — Install GPU-enabled JAX
pip install "jax[cuda12]" cupy-cuda12x nvidia-curand-cu12
Step 4 — Install dinox
# With CuPy GPU support (recommended)
pip install dinox[cupy]
# Without CuPy
pip install dinox
Step 5 — Verify GPU
python -c "import jax; print('JAX devices:', jax.devices())"
python -c "import cupy; print('CuPy GPU count:', cupy.cuda.runtime.getDeviceCount())"
You should see your NVIDIA GPU listed. If JAX shows only CpuDevice, check that LD_LIBRARY_PATH is unset (see Step 2).
GPU Support
- Designed for single-GPU workflows where all data fits in GPU memory
- Requires CUDA 12-enabled JAX (
pip install "jax[cuda12]") — the pip wheel bundles its own CUDA runtime - Optional CuPy arrays for GPU operations via
dinox[cupy] - Without GPU, CPU fallback is automatic
Development
conda create -n fenics-2019.1_env -c conda-forge fenics==2019.1.0 python=3.11
conda activate fenics-2019.1_env
pip install "jax[cuda12]" cupy-cuda12x nvidia-curand-cu12
unset LD_LIBRARY_PATH # or use the permanent conda hook above
pip install -e ".[dev]"
This installs:
- dinox (editable)
- development tools (pytest, black, flake8, isort)
- bayesflux[hippylib]
- hippylib
- all required JAX dependencies
Requirements
- Python >= 3.10
- FEniCS 2019.1 (via conda)
- JAX >= 0.7.0 (for GPU:
pip install "jax[cuda12]") - NVIDIA driver >= 525 (for GPU)
- Optional: CuPy for GPU array operations (
pip install dinox[cupy])
Troubleshooting
| Problem | Solution |
|---|---|
Unable to load cuSPARSE |
unset LD_LIBRARY_PATH before running Python |
No such file: libcurand.so |
pip install nvidia-curand-cu12 |
JAX shows only CpuDevice |
Ensure jax[cuda12] was installed (not just jax) and LD_LIBRARY_PATH is unset |
nvidia-smi not found |
Install or update NVIDIA driver (>= 525) |
| JAX/CuPy CUDA version conflict | Do not conda install cudatoolkit — let pip wheels provide CUDA |
Repository
- Homepage: https://github.com/dinoSciML/dinox
- Repository: https://github.com/dinoSciML/dinox
Metadata
Release files for dinox 0.5.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| dinox-0.5.6.tar.gz | 17.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dinox-0.5.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.4 kB
Release files / dinox-0.5.6.tar.gz
| Download URL | dinox-0.5.6.tar.gz |
|---|---|
| Size | 17.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5616d478c19b811ddfdb01eb0d97ea6d6ab793df3aa7df12cd5147dd88f4598e
|
|
BLAKE2b-256 checksum How to use checksums |
000efff54a820bb5f8eb4c688de995849864b0f7f1653f1732f10cc69811f897
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.19
|
Release files / dinox-0.5.6-py3-none-any.whl
| Download URL | dinox-0.5.6-py3-none-any.whl |
|---|---|
| Size | 19.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c6721d376404fafd9e901a4adb81caa8c88b807d8cf4810d7a52fe0093937cfe
|
|
BLAKE2b-256 checksum How to use checksums |
d18bdd1cc0da098f5610a13f7d1fcc0e1edfd4f587fcc05542a01f4fbed7ed68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.19
|
Security for dinox 0.5.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.