diff --git a/README.md b/README.md index 4353ca7..395341b 100644 --- a/README.md +++ b/README.md @@ -15,17 +15,55 @@ This repo contains notebooks and scripts demonstrating how to: This code is based on the [pick-benchmark](https://github.com/seisbench/pick-benchmark), the repository accompanying the paper: [Which picker fits my data? A quantitative evaluation of deep learning based seismic pickers](https://doi.org/10.1029/2021JB023499) -### Before running +### Installation method 1 + +Please download and install [Mambaforge](https://github.com/conda-forge/miniforge#mambaforge) following the [official guide](https://github.com/conda-forge/miniforge#install). + +After successful installation and within the Mambaforge environment please clone this repository: + +``` +git clone ssh://git@git.plgrid.pl:7999/eai/platform-demo-scripts.git +``` +and please run for Linux or Windows platforms: + +``` +cd platform-demo-scripts +mambaforge env create -f epos-ai-train.yml +``` +or for OSX: +``` +cd platform-demo-scripts +mambaforge env create -f epos-ai-train-osx.yml +``` + +This will create a conda environment named `platform-demo-scripts` with all required packages installed. + +To run the notebooks and scripts from this repository it is necessary to activate the `platform-demo-scripts` environment by running: + +``` +conda activate platform-demo-scripts +``` + +### Installation method 2 Please [install Poetry](https://python-poetry.org/docs/#installation), a tool for dependency management and packaging in Python. Then we will use only Poetry for creating Python environment and installing dependencies. +Install all dependencies with poetry, run: + +``` +poetry install +``` + +To run the notebooks and scripts from this repository it is necessary to activate the poetry environment by running: + +``` +poetry shell +``` + ### Usage -1. Install all dependencies with poetry, run: - - `poetry install` -2. Prepare .env file with content: +1. Prepare .env file with content: ``` WANDB_HOST="https://epos-ai.grid.cyfronet.pl/" WANDB_API_KEY="your key" @@ -33,15 +71,11 @@ Then we will use only Poetry for creating Python environment and installing depe WANDB_PROJECT="training_seisbench_models_on_igf_data" BENCHMARK_DEFAULT_WORKER=2 -3. Transform data into seisbench format. (unofficial) +2. Transform data into seisbench format. (unofficial) * Download original data from the [drive](https://drive.google.com/drive/folders/1InVI9DLaD7gdzraM2jMzeIrtiBSu-UIK?usp=drive_link) * Run the notebook: `utils/Transforming mseeds to SeisBench dataset.ipynb` -4. Initialize poetry environment: - - `poetry shell` - -5. Run the pipeline script: +3. Run the pipeline script: `python pipeline.py` diff --git a/epos-ai-train-osx.yml b/epos-ai-train-osx.yml new file mode 100644 index 0000000..1502139 --- /dev/null +++ b/epos-ai-train-osx.yml @@ -0,0 +1,21 @@ +name: epos-ai-train +channels: + - pytorch + - nvidia +dependencies: + - python=3.10 + - pytorch=2.0.1 + - PyYAML=6.0 + - python-dotenv=1.0.0 + - pandas=2.0.3 + - obspy=1.4.0 + - wandb=0.15.4 + - torchmetrics=0.11.4 + - pytorch-lightning + - scikit-learn + - openpyxl + - jupyterlab + - notebook + - pip + - pip: + - seisbench==0.4.1 diff --git a/epos-ai-train.yml b/epos-ai-train.yml new file mode 100644 index 0000000..0ecd808 --- /dev/null +++ b/epos-ai-train.yml @@ -0,0 +1,22 @@ +name: epos-ai-train +channels: + - pytorch + - nvidia +dependencies: + - python=3.10 + - pytorch=2.0.1 + - pytorch-cuda + - PyYAML=6.0 + - python-dotenv=1.0.0 + - pandas=2.0.3 + - obspy=1.4.0 + - wandb=0.15.4 + - torchmetrics=0.11.4 + - pytorch-lightning + - scikit-learn + - openpyxl + - jupyterlab + - notebook + - pip + - pip: + - seisbench==0.4.1