|
|
|
# Overview
|
|
|
|
|
|
|
|
ShakeMap makes use of [conda virtual environments](https://conda.io/docs/user-guide/concepts.html#conda-environments). The purpose of this is to try to achieve a fully self-contained environment and avoid conflicts with other software. We have discovered that there are some problems with this strategy in shells other than bash. The use of the install script and conda virtual environments are not required to run ShakeMap, but manually managing the dependencies is difficult and you should be aware that if you choose to do this then you should expect to encounter significant difficulties. That said, the list of dependencies is given in the `environment.yml` file in the root directory.
|
|
|
|
|
|
|
|
# System Requirements
|
|
|
|
To make the installation of ShakeMap as simple as possible, we have tried to keep all dependencies to be python packages. We support and regularly test the install script and code on Linux (we test on CentOS and Ubuntu) and Mac OSX systems. The functionality of this software on Windows systems is unknown, and we do not provide support for Windows installations.
|
|
|
|
|
|
|
|
Prior to the installation described below, make sure your system has the utilities **curl** and **git** in the installing user's path. You will also need the **bash** shell. If your system is missing any of these, install them before proceeding.
|
|
|
|
|
|
|
|
ShakeMap should run on pretty much any modern hardware running Linux or Mac OSX. A typical 4-core, 16GB system should be sufficient for most uses. Large output grids or large numbers of input stations will benefit from more memory and more cores/processors.
|
|
|
|
|
|
|
|
**Note for Mac OSX**: If you are using ShakeMap on an OSX system, you will need to have Xcode and the Xcode "command line tools" installed. The former should be installable from the App Store, and the latter by running this command in a Terminal:
|
|
|
|
|
|
|
|
```
|
|
|
|
xcode-select --install
|
|
|
|
```
|
|
|
|
|
|
|
|
**Mojave (10.14.x)**: you may run into additional problems that often manifest as complaints about not finding the limits.h file. At this point all we can offer is for you to have a look at [this thread](https://stackoverflow.com/questions/52509602/cant-compile-c-program-on-a-mac-after-upgrade-to-mojave) and see if something works for you. Some users have had success running:
|
|
|
|
|
|
|
|
```
|
|
|
|
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
|
|
|
|
```
|
|
|
|
|
|
|
|
and performing that install before running the install.sh script.
|
|
|
|
|
|
|
|
**Catalina (10.15.x)**, **Big Sur (11.x)**, and **Monterey (12.x)**: The steps for 10.14.x, above, will not work. You will need to execute:
|
|
|
|
|
|
|
|
```
|
|
|
|
export CPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
|
|
|
|
```
|
|
|
|
|
|
|
|
before running install.sh. (But first install Xcode and the xcode developer's tools as discussed above.)
|
|
|
|
|
|
|
|
# Instructions
|
|
|
|
If you are already using conda virtual environments, deactivate before proceeding
|
|
|
|
```
|
|
|
|
> conda deactivate
|
|
|
|
```
|
|
|
|
And clone this repository
|
|
|
|
```
|
|
|
|
> git clone -b 'v4.3.0' --depth 1 https://code.usgs.gov/ghsc/esi/shakemap.git shakemap
|
|
|
|
```
|
|
|
|
|
|
|
|
Here we are installing release v4.3.0, but you should replace 'v4.3.0' with whatever release you are installing -- hopefully the latest. If you want the development code, just omit '-b (version)'
|
|
|
|
|
|
|
|
Run the install script in the cloned repository
|
|
|
|
```
|
|
|
|
> cd shakemap
|
|
|
|
> bash install.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
If you want to run the tests later, instead of the above you will need to run install.sh with the -d option:
|
|
|
|
```
|
|
|
|
> bash install.sh -d
|
|
|
|
```
|
|
|
|
If no version of `conda` is detected, it will install [miniconda](https://conda.io/miniconda.html), which we use for managing dependencies and creating a virtual environment for running ShakeMap.
|
|
|
|
|
|
|
|
If the script finishes without errors, then the final two lines of output will be
|
|
|
|
```
|
|
|
|
Successfully installed shakemap
|
|
|
|
Type 'conda activate shakemap' to use this new virtual environment.
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
If you didn't already have conda configured prior to running the install script, you may need to source the bash profile; on OSX:
|
|
|
|
```
|
|
|
|
source ~/.bash_profile
|
|
|
|
```
|
|
|
|
or on linux:
|
|
|
|
```
|
|
|
|
source ~/.bashrc
|
|
|
|
```
|
|
|
|
|
|
|
|
Activate the shakemap virtual environment
|
|
|
|
```
|
|
|
|
> conda activate shakemap
|
|
|
|
```
|
|
|
|
|
|
|
|
[STREC](https://code.usgs.gov/ghsc/esi/strec) has been installed via this process, but it still needs to be configured for your system:
|
|
|
|
|
|
|
|
```
|
|
|
|
> strec_cfg update --datafolder <path/to/data/folder> --slab --gcmt
|
|
|
|
```
|
|
|
|
|
|
|
|
Note that the `datafolder` path should be an absolute path, not a relative path.
|
|
|
|
|
|
|
|
---
|
|
|
|
# Overview
|
|
|
|
|
|
|
|
ShakeMap makes use of [conda virtual environments](https://conda.io/docs/user-guide/concepts.html#conda-environments). The purpose of this is to try to achieve a fully self-contained environment and avoid conflicts with other software. We have discovered that there are some problems with this strategy in shells other than bash. The use of the install script and conda virtual environments are not required to run ShakeMap, but manually managing the dependencies is difficult and you should be aware that if you choose to do this then you should expect to encounter significant difficulties. That said, the list of dependencies is given in the `environment.yml` file in the root directory.
|
|
|
|
|
|
|
|
# System Requirements
|
|
|
|
To make the installation of ShakeMap as simple as possible, we have tried to keep all dependencies to be python packages. We support and regularly test the install script and code on Linux (we test on CentOS and Ubuntu) and Mac OSX systems. The functionality of this software on Windows systems is unknown, and we do not provide support for Windows installations.
|
|
|
|
|
|
|
|
Prior to the installation described below, make sure your system has the utilities **curl** and **git** in the installing user's path. You will also need the **bash** shell. If your system is missing any of these, install them before proceeding.
|
|
|
|
|
|
|
|
ShakeMap should run on pretty much any modern hardware running Linux or Mac OSX. A typical 4-core, 16GB system should be sufficient for most uses. Large output grids or large numbers of input stations will benefit from more memory and more cores/processors.
|
|
|
|
|
|
|
|
**Note for Mac OSX**: If you are using ShakeMap on an OSX system, you will need to have Xcode and the Xcode "command line tools" installed. The former should be installable from the App Store, and the latter by running this command in a Terminal:
|
|
|
|
|
|
|
|
```
|
|
|
|
xcode-select --install
|
|
|
|
```
|
|
|
|
|
|
|
|
**Mojave (10.14.x)**: you may run into additional problems that often manifest as complaints about not finding the limits.h file. At this point all we can offer is for you to have a look at [this thread](https://stackoverflow.com/questions/52509602/cant-compile-c-program-on-a-mac-after-upgrade-to-mojave) and see if something works for you. Some users have had success running:
|
|
|
|
|
|
|
|
```
|
|
|
|
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
|
|
|
|
```
|
|
|
|
|
|
|
|
and performing that install before running the install.sh script.
|
|
|
|
|
|
|
|
**Catalina (10.15.x)**, **Big Sur (11.x)**, and **Monterey (12.x)**: The steps for 10.14.x, above, will not work. You will need to execute:
|
|
|
|
|
|
|
|
```
|
|
|
|
export CPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
|
|
|
|
```
|
|
|
|
|
|
|
|
before running install.sh. (But first install Xcode and the xcode developer's tools as discussed above.)
|
|
|
|
|
|
|
|
# Instructions
|
|
|
|
If you are already using conda virtual environments, deactivate before proceeding
|
|
|
|
```
|
|
|
|
> conda deactivate
|
|
|
|
```
|
|
|
|
And clone this repository
|
|
|
|
```
|
|
|
|
> git clone -b 'v4.4.0' --depth 1 https://code.usgs.gov/ghsc/esi/shakemap.git shakemap
|
|
|
|
```
|
|
|
|
|
|
|
|
Here we are installing release v4.4.0, but you should replace 'v4.4.0' with whatever release you are installing -- hopefully the latest. If you want the development code, just omit '-b (version)'
|
|
|
|
|
|
|
|
You can also find the latest version [here](https://code.usgs.gov/ghsc/esi/shakemap/-/releases) and download and unpack the code.
|
|
|
|
|
|
|
|
Run the install script in the cloned repository
|
|
|
|
```
|
|
|
|
> cd shakemap
|
|
|
|
> bash install.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
If you want to run the tests later, instead of the above you will need to run install.sh with the -d option:
|
|
|
|
```
|
|
|
|
> bash install.sh -d
|
|
|
|
```
|
|
|
|
If no version of `conda` is detected, it will install [miniconda](https://conda.io/miniconda.html), which we use for managing dependencies and creating a virtual environment for running ShakeMap.
|
|
|
|
|
|
|
|
If the script finishes without errors, then the final two lines of output will be
|
|
|
|
```
|
|
|
|
Successfully installed shakemap
|
|
|
|
Type 'conda activate shakemap' to use this new virtual environment.
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
If you didn't already have conda configured prior to running the install script, you may need to source the bash profile; on OSX:
|
|
|
|
```
|
|
|
|
source ~/.bash_profile
|
|
|
|
```
|
|
|
|
or on linux:
|
|
|
|
```
|
|
|
|
source ~/.bashrc
|
|
|
|
```
|
|
|
|
|
|
|
|
Activate the shakemap virtual environment
|
|
|
|
```
|
|
|
|
> conda activate shakemap
|
|
|
|
```
|
|
|
|
|
|
|
|
[STREC](https://code.usgs.gov/ghsc/esi/strec) has been installed via this process, but it still needs to be configured for your system:
|
|
|
|
|
|
|
|
```
|
|
|
|
> strec_cfg update --datafolder <path/to/data/folder> --slab --gcmt
|
|
|
|
```
|
|
|
|
|
|
|
|
Note that the `datafolder` path should be an absolute path, not a relative path.
|
|
|
|
|
|
|
|
---
|
|
|
|
Next step: [Testing](testing) |
|
|
\ No newline at end of file |