Package: nvidia-modulus
Modulus (Beta)Modulus is an open source deep-learning framework for building, training, and fine-tuning
deep learning models using state-of-the-art Physics-ML methods.Whether you are exploring the use of Neural operators like Fourier Neural Operators or
interested in Physics informed Neural Networks or a hybrid approach in between, Modulus
provides you with the optimized stack that will enable you to train your models at real
world scale.This package is the core module that provides the core algorithms, network architectures
and utilities that cover a broad spectrum of physics-constrained and data-driven
workflows to suit the diversity of use cases in the science and engineering disciplines.Detailed information on features and capabilities can be found in theModulus documentation.Modulus PackagesModulus (Beta): Open-source deep-learning
framework for building, training, and fine-tuning deep learning models using
state-of-the-art Physics-ML methods.Modulus Symbolic (Beta): Framework
providing pythonic APIs, algorithms and utilities to be used with Modulus
core to physics inform model training as well as higher level abstraction
for domain experts.Domain Specific PackagesEarth-2 MIP (Beta): Python framework
to enable climate researchers and scientists to explore and experiment with
AI models for weather and climate.InstallationPyPiThe recommended method for installing the latest version of Modulus is using PyPi:pipinstallnvidia-modulusThe installation can be verified by running a simple python code snippet as shown below:python>>>importtorch>>>frommodulus.models.mlp.fully_connectedimportFullyConnected>>>model=FullyConnected(in_features=32,out_features=64)>>>input=torch.randn(128,32)>>>output=model(input)>>>output.shapetorch.Size([128,64])Optional dependenciesModulus has many optional dependencies that are used in specific components.
When using pip, all dependencies used in Modulus can be installed withpip install nvidia-modulus[all]. If you are developing Modulus, developer dependencies
can be installed usingpip install nvidia-modulus[dev]. Otherwise, additional dependencies
can be installed on a case by case basis. A detailed information on installing the
optional dependencies can be found in theGetting Started Guide.NVCR ContainerThe recommended Modulus docker image can be pulled from theNVIDIA Container Registry:dockerpullnvcr.io/nvidia/modulus/modulus:24.01Inside the container you can clone the Modulus git repositories and get started with the
examples. Below command show the instructions to launch the modulus container and run an
examples from this repo.dockerrun--shm-size=1g--ulimitmemlock=-1--ulimitstack=67108864--runtimenvidia\--rm-itnvcr.io/nvidia/modulus/modulus:24.01bash
gitclonehttps://github.com/NVIDIA/modulus.gitcdmodulus/examples/cfd/darcy_fno/
pipinstallwarp-lang# install NVIDIA Warp to run the darcy examplepythontrain_fno_darcy.pyFrom SourcePackageFor a local build of the Modulus Python package from source use:gitclonegit@github.com:NVIDIA/modulus.git&&cdmodulus

pipinstall--upgradepip
pipinstall.Source ContainerTo build Modulus docker image:dockerbuild-tmodulus:deploy\--build-argTARGETPLATFORM=linux/amd64--targetdeploy-fDockerfile.Alternatively, you can runmake container-deployTo build CI image:dockerbuild-tmodulus:ci\--build-argTARGETPLATFORM=linux/amd64--targetci-fDockerfile.Alternatively, you can runmake container-ci.Currently onlylinux/amd64andlinux/arm64platforms are supported. If usinglinux/arm64, some dependencies likewarp-langmight not install correctly.ContributingModulus is an open source collaboration and its success is rooted in community
contribution to further the field of Physics-ML. Thank you for contributing to the
project so others can build on your contribution.
For guidance on making a contribution to Modulus, please refer to thecontributing guidelines.CommunicationGithub Discussions: Discuss new architectures, implementations, Physics-ML research, etc.GitHub Issues: Bug reports, feature requests, install issues, etc.Modulus Forum: TheModulus Forumhosts an audience of new to moderate level users and developers for general chat, online
discussions, collaboration, etc.LicenseModulus is provided under the Apache License 2.0, please seeLICENSE.txtfor full license text.