Skip to content

INGV/some-docker

Repository files navigation

SOME-docker

Collection of docker's images (Dockerfile) for machine learning development. Currently, there are 6 different docker-images to be compiled by the end-user:

For GPD:

  • gpd_conda_tf1_gpu: This docker represents the original version of GPD as described in Ross et al. (2020).
  • gpd_conda_tf1_gpu.app: the relative app version. Calling this docker will result in a direct prediction over miniseed streams.

For PHASENET:

  • phasenet_conda_tf2_gpu Original implementation as descrived in Zhu et al. (2019).
  • phasenet_conda_tf2_gpu.app is the relative app version. Calling this docker will result in a direct prediction over miniseed streams.

For EQTransformer ():

  • eqt_conda_tf2_gpu: This docker represents the original version of EQT as described in Mousavi et al. (2020). Still under development
  • eqt_conda_tf2_gpu.app: the relative app version. Calling this docker will result in a direct prediction over miniseed streams. Still under development

PhaseNet picks with the default, pre-trained model. All the additional flags apart from the --model one must be specified. To check everything is running properly, there's the utility function runpn_test that emulates the example reported here

Inside each Docker, there are some shell utils and aliases useful for production. In addition, for the non-app dockers, the shell prompt is colored differently to distinguish it from other regular host's shell tabs. There's installed also byobu (for tmux and multishell work) and jupyter-lab as well.

Currently, the 2 apps (GPD/PN) are shipped with wrappers for fast In/Out predictions. Please use the 2 wrappers stored in the respective subfolder.

  • run_gpd_app.sh
  • run_phasenet_app.sh

Both wrappers comes with an on-screen helper (-h). CHeck it before running.

HOW TO

To proceed with the Docker builds, you must have Docker already installed on your machine. Check here for the details

Once installed, proceed with the building:

$ cd MYDOCKERFOLDER
# Depending on your machine, run:
$ docker build --platform linux/amd64 -t NAME:TAG  # --> emulate linux INTEL
# ... or
$ docker build --platform linux/arm64 -t NAME:TAG  # --> emulate linux MAC-M-processor

For running one of the images and accessing the container with a root shell:

# If you want to run with CPUs only, just remove the `--gpus all` flag

$ docker run --rm --gpus all -it NAME:TAG /bin/bash

# If you want to mount a DATA disk with the necessary waveforms do:

$ docker run --rm --gpus all -v HOSTPATH:MOUNTPATH -it NAME:TAG /bin/bash

Please remember that the HOSTPATH and MOUNTPATH must be absolute path

To run the images with GPUs support, you must have the nvidia-docker support on your host system. Easiest (and recommended way) is machine-dependent and is listed here


Useful links

REFERENCES

  • Mousavi, S.M., Ellsworth, W.L., Zhu, W., Chuang, L.Y., Beroza, G.C., 2020. Earthquake transformer—an attentive deep-learning model for simultaneous earthquake detection and phase picking. Nat Commun 11, 3952. https://doi.org/10.1038/s41467-020-17591-w
  • EQT_github_page
  • Ross, Z.E., Meier, M.-A., Hauksson, E., Heaton, T.H., 2018. Generalized seismic phase detection with deep learning. Bulletin of the Seismological Society of America 108, 2894–2901.
  • GPD_github_page
  • Zhu, W., Beroza, G.C., 2019. PhaseNet: a deep-neural-network-based seismic arrival-time picking method. Geophys J Int 216, 261–273. https://doi.org/10.1093/gji/ggy423
  • Phasenet_github_page

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published