Common Commands - conrad-blucher-institute/semaphore GitHub Wiki
This page documents common commands used in Semaphore. The following steps should be implemented after following the instructions in the README.md.
Run a Model or Multiple Models
docker exec semaphore-core python3 src/semaphoreRunner.py -d ./data/dspec/Surge/North_Jetty/nj_mlp_surge_48h_pred.json ./data/dspec//Surge/North_Jetty/nj_mlp_surge_72h_pred.json
Build Docker Containers (Must re-build containers if you make changes to the code)
- docker compose down --volumes
- docker compose up --build -d
Database Migration
-
Start the docker containers
-
Create database migration and change target version
-
docker exec semaphore-core python3 ./tools/migrate_db.py -
Check the database to ensure the database version was changed and what you intended to add was added
Unit Tests
We use the library Pytest to create tests for specific sections of Semaphore. Run a command: docker exec semaphore-core python -m pytest -s path to file
for example, docker exec semaphore-core python -m pytest -s src/tests/IntegrationTests/test_HOHONU.py
To test all at once: docker exec semaphore-core python3 -m pytest -s
All Model Commands
Coldstunning
docker exec semaphore-core python3 src/semaphoreRunner.py -d ./data/dspec/ColdStunning/Bird-Island_Water-Temperature_3hr.json ./data/dspec/ColdStunning/Bird-Island_Water-Temperature_6hr.json ./data/dspec/ColdStunning/Bird-Island_Water-Temperature_12hr.json ./data/dspec/ColdStunning/Bird-Island_Water-Temperature_18hr.json ./data/dspec/ColdStunning/Bird-Island_Water-Temperature_24hr.json ./data/dspec/ColdStunning/Bird-Island_Water-Temperature_30hr.json ./data/dspec/ColdStunning/Bird-Island_Water-Temperature_36hr.json ./data/dspec/ColdStunning/Bird-Island_Water-Temperature_42hr.json ./data/dspec/ColdStunning/Bird-Island_Water-Temperature_48hr.json ./data/dspec/ColdStunning/Bird-Island_Water-Temperature_54hr.json ./data/dspec/ColdStunning/Bird-Island_Water-Temperature_60hr.json ./data/dspec/ColdStunning/Bird-Island_Water-Temperature_66hr.json ./data/dspec/ColdStunning/Bird-Island_Water-Temperature_72hr.json ./data/dspec/ColdStunning/Bird-Island_Water-Temperature_78hr.json ./data/dspec/ColdStunning/Bird-Island_Water-Temperature_84hr.json ./data/dspec/ColdStunning/Bird-Island_Water-Temperature_90hr.json ./data/dspec/ColdStunning/Bird-Island_Water-Temperature_96hr.json ./data/dspec/ColdStunning/Bird-Island_Water-Temperature_102hr.json ./data/dspec/ColdStunning/Bird-Island_Water-Temperature_108hr.json ./data/dspec/ColdStunning/Bird-Island_Water-Temperature_114hr.json ./data/dspec/ColdStunning/Bird-Island_Water-Temperature_120hr.json ./data/dspec/ColdStunning/MRE_Bird-Island_Water-Temperature_3hr.json ./data/dspec/ColdStunning/MRE_Bird-Island_Water-Temperature_6hr.json ./data/dspec/ColdStunning/MRE_Bird-Island_Water-Temperature_12hr.json ./data/dspec/ColdStunning/MRE_Bird-Island_Water-Temperature_18hr.json ./data/dspec/ColdStunning/MRE_Bird-Island_Water-Temperature_24hr.json ./data/dspec/ColdStunning/MRE_Bird-Island_Water-Temperature_30hr.json ./data/dspec/ColdStunning/MRE_Bird-Island_Water-Temperature_36hr.json ./data/dspec/ColdStunning/MRE_Bird-Island_Water-Temperature_42hr.json ./data/dspec/ColdStunning/MRE_Bird-Island_Water-Temperature_48hr.json ./data/dspec/ColdStunning/MRE_Bird-Island_Water-Temperature_54hr.json ./data/dspec/ColdStunning/MRE_Bird-Island_Water-Temperature_60hr.json ./data/dspec/ColdStunning/MRE_Bird-Island_Water-Temperature_66hr.json ./data/dspec/ColdStunning/MRE_Bird-Island_Water-Temperature_72hr.json ./data/dspec/ColdStunning/MRE_Bird-Island_Water-Temperature_78hr.json ./data/dspec/ColdStunning/MRE_Bird-Island_Water-Temperature_84hr.json ./data/dspec/ColdStunning/MRE_Bird-Island_Water-Temperature_90hr.json ./data/dspec/ColdStunning/MRE_Bird-Island_Water-Temperature_96hr.json ./data/dspec/ColdStunning/MRE_Bird-Island_Water-Temperature_102hr.json ./data/dspec/ColdStunning/MRE_Bird-Island_Water-Temperature_108hr.json ./data/dspec/ColdStunning/MRE_Bird-Island_Water-Temperature_114hr.json ./data/dspec/ColdStunning/MRE_Bird-Island_Water-Temperature_120hr.json
CRPS
docker exec semaphore-core python3 src/semaphoreRunner.py -d ./data/dspec/CRPS/CRPS_3hr.json ./data/dspec/CRPS/CRPS_6hr.json ./data/dspec/CRPS/CRPS_12hr.json ./data/dspec/CRPS/CRPS_18hr.json ./data/dspec/CRPS/CRPS_24hr.json ./data/dspec/CRPS/CRPS_30hr.json ./data/dspec/CRPS/CRPS_36hr.json ./data/dspec/CRPS/CRPS_42hr.json ./data/dspe
c/CRPS/CRPS_48hr.json ./data/dspec/CRPS/CRPS_54hr.json ./data/dspec/CRPS/CRPS_60hr.json ./data/dspec/CRPS/CRPS_66hr.json ./data/dspec/CRPS/CRPS_72hr.json ./data/dspec/CRPS/CRPS_78hr.json ./data/dspec/C
RPS/CRPS_84hr.json ./data/dspec/CRPS/CRPS_90hr.json ./data/dspec/CRPS/CRPS_96hr.json ./data/dspec/CRPS/CRPS_102hr.json ./data/dspec/CRPS/CRPS_108hr.json ./data/dspec/CRPS/CRPS_114hr.json ./data/dspec/CRPS/CRPS_120hr.json
Inundation
docker exec semaphore-core python3 src/semaphoreRunner.py -d ./data/dspec/Inundation/January/ar_inundation_jan_12h.json ./data/dspec/Inundation/January/ar_inundation_jan_24h.json ./data/dspec/Inundation/January/ar_inundation_jan_48h.json ./data/dspec/Inundation/February/ar_inundation_feb_12h.json ./data/dspec/Inundation/February/ar_inundation_feb_24h.json ./data/dspec/Inundation/February/ar_inundation_feb_48h.json ./data/dspec/Inundation/March/ar_inundation_mar_12h.json ./data/dspec/Inundation/March/ar_inundation_mar_24h.json ./data/dspec/Inundation/March/ar_inundation_mar_48h.json ./data/dspec/Inundation/April/ar_inundation_apr_12h.json ./data/dspec/Inundation/April/ar_inundation_apr_24h.json ./data/dspec/Inundation/April/ar_inundation_apr_48h.json ./data/dspec/Inundation/May/ar_inundation_may_12h.json ./data/dspec/Inundation/May/ar_inundation_may_24h.json ./data/dspec/Inundation/May/ar_inundation_may_48h.json ./data/dspec/Inundation/June/ar_inundation_jun_12h.json ./data/dspec/Inundation/June/ar_inundation_jun_24h.json ./data/dspec/Inundation/June/ar_inundation_jun_48h.json ./data/dspec/Inundation/July/ar_inundation_jul_12h.json ./data/dspec/Inundation/July/ar_inundation_jul_24h.json ./data/dspec/Inundation/July/ar_inundation_jul_48h.json ./data/dspec/Inundation/August/ar_inundation_aug_12h.json ./data/dspec/Inundation/August/ar_inundation_aug_24h.json ./data/dspec/Inundation/August/ar_inundation_aug_48h.json ./data/dspec/Inundation/September/ar_inundation_sep_12h.json ./data/dspec/Inundation/September/ar_inundation_sep_24h.json ./data/dspec/Inundation/September/ar_inundation_sep_48h.json
Magnolia
docker exec semaphore-core python3 src/semaphoreRunner.py -d ./data/dspec/Magnolia/12/magnolia_12.json ./data/dspec/Magnolia/12/magnolia_transform_12.json ./data/dspec/Magnolia/24/magnolia_24.json ./data/dspec/Magnolia/24/magnolia_transform_24.json ./data/dspec/Magnolia/48/magnolia_48.json ./data/dspec/Magnolia/48/magnolia_transform_48.json
Surge
docker exec semaphore-core python3 src/semaphoreRunner.py -d ./data/dspec/Surge/Aransas/ar_mlp_surge_12h_pred.json ./data/dspec/Surge/Aransas/ar_mlp_surge_24h_pred.json ./data/dspec/Surge/Aransas/ar_mlp_surge_48h_pred.json ./data/dspec/Surge/Aransas/ar_mlp_surge_72h_pred.json ./data/dspec/Surge/North_Jetty/nj_mlp_surge_12h_pred.json ./data/dspec/Surge/North_Jetty/nj_mlp_surge_24h_pred.json ./data/dspec/Surge/North_Jetty/nj_mlp_surge_48h_pred.json ./data/dspec/Surge/North_Jetty/nj_mlp_surge_72h_pred.json ./data/dspec/Surge/Port_Isabel/pi_mlp_surge_12h_pred.json ./data/dspec/Surge/Port_Isabel/pi_mlp_surge_24h_pred.json ./data/dspec/Surge/Port_Isabel/pi_mlp_surge_48h_pred.json ./data/dspec/Surge/Port_Isabel/pi_mlp_surge_72h_pred.json ./data/dspec/Surge/Rockport/rp_mlp_surge_12h_pred.json ./data/dspec/Surge/Rockport/rp_mlp_surge_24h_pred.json ./data/dspec/Surge/Rockport/rp_mlp_surge_48h_pred.json ./data/dspec/Surge/Rockport/rp_mlp_surge_72h_pred.json
Virginia Key
docker exec semaphore-core python3 src/semaphoreRunner.py -d ./data/dspec/VirginiaKey/12hr_VirginiaKey_wl_Estrada.json ./data/dspec/VirginiaKey/24hr_VirginiaKey_wl_Estrada.json ./data/dspec/VirginiaKey/48hr_VirginiaKey_wl_Estrada.json ./data/dspec/VirginiaKey/72hr_VirginiaKey_wl_Estrada.json ./data/dspec/VirginiaKey/96hr_VirginiaKey_wl_Estrada.json