Skip to content

Installing and Using LEAP

Kyle Champley edited this page May 5, 2024 · 13 revisions

Dependencies

To use LEAP, you must install the following packages

PyTorch

cmake version 3.23 or newer

CUDA toolkit 11.7 or newer (See section below about compiling without a GPU or on Mac)

Linux: gcc compiler

Windows: Visual Studio 2019 (be sure to check the box that says "Desktop development with C++")

Installation

To install LEAP package, use pip command:

$ pip install .

It is strongly recommended to run "pip uninstall leapct" if you have installed the previous version. If you run into an installation error, please re-run the install with the "-v" argument, i.e.,

$ pip install -v .

If this doesn't help resolve your issue, please open an issue and we'll see if we can help.

Installation on Livermore Computing (Intel/Linux)

To install LEAP on Livermore Computing, proper modules should be loaded first. To enable GPU features, the installation should be performed under the compute node where nvidia-smi is available. For example,

$ salloc --partition=pbatch --time=1:00:00
$ module load gcc/8.3.0
$ module load cuda/11.7.0
$ pip install .

Installation on Livermore Computing (IBM PowerAI)

$ bsub -G mlct -W 1:00 -Is bash
$ module load gcc/8.3.0
$ module load cuda/11.7.0
$ pip install .

Building without a GPU or on Mac

All you need to do here is swap the CMake file. Rename cpu_CMakeLists.txt to CMakeLists.txt. Then you can follow any of the install instructions above.

Usage

Please see our example scripts in the demo_leaptorch directory.

We also highly recommend looking at the example scripts in the demo_leapctype directory. These contain examples of specifying other geometries and other use cases.