Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/earthinversion/phasenet-docker
Running PhaseNet picking method as a docker container
https://github.com/earthinversion/phasenet-docker
Last synced: 2 days ago
JSON representation
Running PhaseNet picking method as a docker container
- Host: GitHub
- URL: https://github.com/earthinversion/phasenet-docker
- Owner: earthinversion
- License: mit
- Created: 2024-10-15T16:07:15.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-10-15T17:33:22.000Z (3 months ago)
- Last Synced: 2024-10-16T23:02:01.929Z (3 months ago)
- Language: Jupyter Notebook
- Homepage:
- Size: 3.38 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Running PhaseNet on AWS EC2 Instance
- Original Code: https://github.com/AI4EPS/PhaseNet.git## Connect to EC2 instance using SSH
```
chmod 400 eqw_phasenet.pem
ssh -i "eqw_phasenet.pem" [email protected]
```## Remote machine
```bash
sudo yum install gitsudo yum install docker
sudo systemctl start docker
sudo systemctl enable docker #enable on boot## install docker-compose (optional)
sudo curl -L "https://github.com/docker/compose/releases/download/v2.20.2/docker-compose-linux-x86_64" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --versionsudo usermod -aG docker $USER
## Log out and log back ingit clone https://github.com/earthinversion/phasenet-docker.git
cd phasenet-docker## Run using docker
docker build -t phasenet-server .
docker run -d -p 80:7860 --name phasenet-server phasenet-server## Run using docker compose
docker-compose build
docker-compose up -d```
## Troubleshooting
```bashdocker logs phasenet-server
## Remove all stopped containers
docker rm $(docker ps -a -q)## To remove all images that are not in use by a container
docker system prune --all## Get inside the docker container
docker exec -it phasenet-server /bin/bashuvicorn --app-dir eqnet app:app --reload --host 0.0.0.0 --port 7860
```## Application
```
http://
http://34.221.45.133
```## Test your phasenet API
```bash
#Run example_fastapi.ipynb
python example_phasenet_run.py
```## References
Zhu, W., and Beroza, G. C., 2018. PhaseNet: A Deep-Neural-Network-Based Seismic Arrival Time Picking Method. Geophysical Journal International. DOI: 10.1093/gji/ggy423