Install and Setup

Preinstall ML packages

PINNICLE requires Python ≥ 3.9 and supports several different machine learning backends. In order to install PINNICLE properly, you will need to install one of the following packages:

  • TensorFlow ≥ 2.11.0 (Optionally with tensorflow-probability ≥ 0.19.0)

pip install tensorflow>=2.11.0 tensorflow-probability[tf]>=0.19.0
  • PyTorch ≥ 1.9.0

pip install torch torchvision torchaudio
  • JAX (plus Flax, Optax)

pip install jax flax optax

Installation

The easiest way to install PINNICLE is directly from PyPI:

pip install pinnicle

This will install the core package and automatically resolve most dependencies.

Alternatively, if you’d like to clone and modify the source code:

git clone https://github.com/ISSMteam/PINNICLE.git
cd PINNICLE
pip install -e .

Required Dependencies

If you install via pip, most dependencies are handled automatically. For manual setup, make sure the following libraries are installed:

Working with Different Backends

PINNICLE relies on DeepXDE to interface with your preferred machine learning backend.

Option 1: Environment Variable

Run PINNICLE with your selected backend:

DDE_BACKEND=tensorflow python your_script.py

You can also export the backend globally (Linux/macOS):

export DDE_BACKEND=pytorch

Valid options: tensorflow, pytorch, jax

Option 2: Config File

Create or edit ~/.deepxde/config.json:

{
  "backend": "tensorflow"
}

This sets the default backend for all runs.

Or, you can use python -m deepxde.backend.set_default_backend BACKEND to set the default backend.

Run with Docker

PINNICLE can also be run in a fully containerized environment using Docker. This is ideal for avoiding dependency conflicts or running the software in a reproducible HPC/cloud environment. The PINNICLE Docker image contains all the required packages to run PINNICLE with GPU support.

apptainer build --nv set_your_own_name docker://chenggongdartmouth/pinnicle:v0.3

See the details instructions about how to set up PINNICLE Docker

Optional: GPU Setup

To run large models efficiently, install the GPU-enabled version of your backend.