Skip to content

Commit

Permalink
Package env (#255)
Browse files Browse the repository at this point in the history
* Deleting stale setup instructions

* Adding install scripts for Gadi, VDI and windows

* Adding more packages to installation scripts

* Adding more packages to install-scripts

* Adding an install-script for linux

* More updates to install-scripts

* Minor changes to install-scripts

* Minor changes to install scripts

* Updating conda script for linux

Conda env now includes geos and proj4 for
compiling shapely and cartopy

* Adding conda install script for osx

* Upgrading to obspy 1.2.0

* Upgrading obspy and openmp versions

* Upgrading obspy==1.2.2 for osx-conda

* Upgrading obspy==1.2.2 for win-conda

* Updating Install Scripts

* Added gdal to linux env
* Adding parallel h5py to vdi env

* Adding remi to dependency list

* Update README.rst

* Adding a readme for setup scripts

* Renaming readme

* Update README.md

* Updating readme with more details on windows setup instructions

* Update README.md

* Update README.rst

* Update README.rst
  • Loading branch information
geojunky committed Sep 7, 2023
1 parent e68ade6 commit a4ff15e
Show file tree
Hide file tree
Showing 13 changed files with 382 additions and 301 deletions.
41 changes: 12 additions & 29 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,8 @@ Overview
Current Contacts
================

- Fei Zhang: fei.zhang@ga.gov.au

- Rakib Hassan: rakib.hassan@ga.gov.au


- Alexei Gorbatov: alexei.gorbatov@ga.gov.au

- Babak Hejrani: babak.hejrani@ga.gov.au
Expand All @@ -38,41 +35,27 @@ Current Contacts
System Requirements
==========================

- Linux OS, including Ubuntu and CentOS
- Python 3.6 or higher (recommended)
- Python 2.7 (deprecated, no longer supported)

Third Party Library Dependencies
================================

Certain modules require specific third party (non-Python) libraries to be installed
on the host system. For example, scripts that convert to sc3ml format also require Seiscomp3 to be
installed and to be visible in the PATH. In most cases, Python libraries that depend on third party
libraries will indicate their dependencies either during attempted installation, or when used at
runtime. Note that the following list includes indirect dependencies, i.e. dependencies that come
from Python libraries used by HiPerSeis.

Current third party dependencies (actual requirements may vary by platform or Python distribution):
- Python 3.6 (recommended)

- `HDF5 <http://hdfgroup.org/>`_
- MPI, for example `Open MPI <https://www.open-mpi.org/>`_
- `PROJ <https://proj.org/>`_
- `GEOS <https://trac.osgeo.org/geos>`_


Installation Guide for Developers
Setup Guide
=================================

1. First, obtain the source code from `Github repository <https://github.com/GeoscienceAustralia/hiperseis>`_

- ``git clone https://github.com/GeoscienceAustralia/hiperseis.git``
- ``cd hiperseis``
- ``git submodule init``
- ``git submodule update``
- ``git submodule update --init --recursive``

2. HiPerSeis does not provide an installation script due to the number of dependencies involved, some of which require low-level libraries to be available on the host machine. Instead, shell scripts are provided in ``hiperseis/setup_scripts`` for Linux, OSX and Windows for installing dependencies through a combination of Conda and Pip. A shell script is provided for NCI GADI, tailored exclusively for the current list of low-level HPC libraries e.g. MPI, HDF5, etc. available on the system.

3. To use HiPerSeis in the checked out location, you will need to add the root HiPerSeis folder to your PYTHONPATH variable. For example, if you checked out HiPerSeis to the folder `dev/hiperseis` relative to your home directory, then in a `bash` shell you need to execute the following shell command: ``export PYTHONPATH=$HOME/dev/hiperseis``. This needs to be done for each command shell session, or added to ``.bashrc`` or its equivalent.

2. Install Python environment and dependency packages. See `Wiki Pages <https://github.com/GeoscienceAustralia/hiperseis/wiki>`_
Third Party Library Dependencies
================================

3. To use HiPerSeis in the checked out location, you will need to add the root HiPerSeis folder to your PYTHONPATH variable. For example, if you checked out HiPerSeis to the folder `dev/hiperseis` relative to your home directory, then in a `bash` shell you need to execute the following shell command: ``export PYTHONPATH=$HOME/dev/hiperseis``. This needs to be done for each command shell session.
Certain modules require specific third party (non-Python) libraries to be installed
on the host system. For example, scripts that convert to sc3ml format also require Seiscomp3 to be
installed and to be visible in the PATH.

License
===============
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
42 changes: 0 additions & 42 deletions requirements.in

This file was deleted.

78 changes: 0 additions & 78 deletions requirements.txt

This file was deleted.

8 changes: 0 additions & 8 deletions setup.cfg

This file was deleted.

144 changes: 0 additions & 144 deletions setup.py

This file was deleted.

40 changes: 40 additions & 0 deletions setup_scripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Anaconda-based Setups

1. Setup scripts provided for Linux, OSX and Windows (conda_env_*.sh) are based on
[Anaconda3-2021.11](https://repo.anaconda.com/archive/).
Refer to Anaconda installation instructions [here](https://conda.io/projects/conda/en/latest/user-guide/install/index.html)

2. Launch setup shell script for your OS:

Note that the setup script for Windows is a whittled down version compared to the Linux and OSX versions. While most of the dependecies
are covered, some that require code compilation are excluded, specifically to cater to institutional Windows machines with strict security controlls in place. ``conda_env_windows.sh`` should be launched from Git BASH -- refer to its installation instructions [here](https://gitforwindows.org/).

Launch setup script, e.g. for Linux as follows:

``source hiperseis/setup_scripts/conda_env_linux.sh env_name || true``

where, ``env_name`` is the name of the environment to be created (e.g. hiperseis_env) and
`` || true`` ensures the shell terminal the command is run from does not terminate
if errors are encountered.



3. Activate the newly created environment:

``conda activate env_name``

Note that the environment must be activated for each new terminal session from which HiPerSeis scripts are to be run. Alternatively, it can be added to the ``.bashrc`` file.

# GADI

1. The setup script for GADI is launched as:

``sh hiperseis/setup_scripts/setup_env_gadi.sh env_name``

where, ``env_name`` is the name of the environment to be created (e.g. hiperseis_env).

2. Activate the newly created environment:

``source env_name/bin/activate``

Note that the environment must be activated for each new terminal session from which HiPerSeis scripts are to be run. Alternatively, it can be added to the ``.bashrc`` file.

0 comments on commit a4ff15e

Please sign in to comment.