Installation¶
To run the USGS slab model code on your local device, begin by cloning the USGS Slab Model repository from GitLab. Next, you will need to create the Python virtual environment, which is best achieved using miniforge. Within the slab model project on your local device, open a terminal window and use the command “conda env create –file slab2env.yml” to create the environment. Once complete, use the command conda activate slab2env to activate the environment. At this point, the python environment has been successfully installed and is ready to use.
End-to-end Test¶
To ensure the USGS slab model code has been installed correctly, you can run a synthetic test to generate a basic
example model before investing time in running larger models. The easiest way to run the synthetic
test is through the command line. To do so, simply open a terminal window in the Slab2/ directory,
activate the slab2env environment with the command: conda activate slab2env
, and run the command:
pytest
. The test should not take more than a minute and will check that all code in Slab2 is working
as it should.
Note
This step is not necessary for installing the project, but can be helpful for debugging if any changes are made.