diff --git a/docs/pages/Building-&-Running.md b/docs/pages/Building-&-Running.md index 12d1ad33e5483a43a18ecbd7079a50aacdb7e91d..37a93a42da6dc29ea6a8e5b5a40152c939095b61 100644 --- a/docs/pages/Building-&-Running.md +++ b/docs/pages/Building-&-Running.md @@ -107,11 +107,16 @@ to a minimum of 4 GB. ### Run nshmp-haz in Docker The *nshmp-haz* application may be run as a Docker container which mitigates the need to install -Git, Java, or other dependencies besides Docker. A public image is available on -Docker hub at [https://hub.docker.com/r/usgs/nshmp-haz](https://hub.docker.com/r/usgs/nshmp-haz) +Git, Java, or other dependencies besides Docker. A public image is available +from this repository's +[container registry](https://code.usgs.gov/ghsc/nshmp/nshmp-haz/container_registry). which can be run with: ```bash +# Pull docker image +docker pull code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz:latest + +# Run docker image docker run \ --env CLASS_NAME=<DisaggCalc | HazardCalc | RateCalc> \ --env IML=<NUMBER> \ @@ -119,7 +124,7 @@ docker run \ --volume /absolute/path/to/sites/file:/app/sites.<geojson | csv> \ --volume /absolute/path/to/config/file:/app/config.json \ --volume /absolute/path/to/output:/app/output \ - usgs/nshmp-haz + code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz-ws ``` Where: @@ -152,7 +157,7 @@ assumption a GeoJSON [site](./Site-Specification.md) file exists named `sites.ge git clone https://code.usgs.gov/ghsc/nshmp/nshms/nshm-hawaii.git # Pull image -docker pull usgs/nshmp-haz:production-latest +docker pull code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz:latest # Run nshmp-haz HazardCalc docker run \ @@ -160,7 +165,7 @@ docker run \ --volume "$(pwd)/nshm-hawaii:/app/model" \ --volume "$(pwd)/sites.geojson" \ --volume "$(pwd)/hawaii-hazard-output:/app/output" \ - usgs/nshmp-haz:production-latest + code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz ``` #### [`DisaggCalc`](../../src/main/java/gov/usgs/earthquake/nshmp/DisaggCalc.java) Example @@ -174,7 +179,7 @@ assumption a GeoJSON [site](./Site-Specification.md) file exists named `sites.ge git clone https://code.usgs.gov/ghsc/nshmp/nshms/nshm-hawaii.git # Pull image -docker pull usgs/nshmp-haz:production-latest +docker pull code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz:latest # Run nshmp-haz DisaggCalc docker run \ @@ -183,7 +188,7 @@ docker run \ --volume "$(pwd)/nshm-hawaii:/app/model" \ --volume "$(pwd)/sites.geojson" \ --volume "$(pwd)/hawaii-disagg-output:/app/output" \ - usgs/nshmp-haz:production-latest + code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz:latest ``` #### [`RateCalc`](../../src/main/java/gov/usgs/earthquake/nshmp/RateCalc.java) Example @@ -197,7 +202,7 @@ assumption a GeoJSON [site](./Site-Specification.md) file exists named `sites.ge git clone https://code.usgs.gov/ghsc/nshmp/nshms/nshm-hawaii.git # Pull image -docker pull usgs/nshmp-haz:production-latest +docker pull code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz:latest # Run nshmp-haz RateCalc docker run \ @@ -205,7 +210,7 @@ docker run \ --volume "$(pwd)/nshm-hawaii:/app/model" \ --volume "$(pwd)/sites.geojson" \ --volume "$(pwd)/hawaii-rate-output:/app/output" \ - usgs/nshmp-haz:production-latest + code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz ``` ### Run Customization @@ -217,13 +222,13 @@ be set with the environment flag (-e, -env): docker run \ --env JAVA_MEMORY=<MEMORY> \ ... - usgs/nshmp-haz + code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz # Example docker run \ --env JAVA_MEMORY="12g" \ ... - usgs/nshmp-haz + code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz ``` Where: diff --git a/docs/pages/Web-Services.md b/docs/pages/Web-Services.md index 2285cd0c28d2d2e0b41953726555366017634efb..3076ca1dbf115e770cb9ec0e4793b87533c32412 100644 --- a/docs/pages/Web-Services.md +++ b/docs/pages/Web-Services.md @@ -80,7 +80,7 @@ to a minimum of 4 GB. ### Docker Build Options * [Build and run docker locally](#build-and-run-docker-locally) -* [Run from Docker Hub](#run-from-docker-hub) +* [Run from Container Registry](#run-from-container-registry) ### Build and Run Docker Locally @@ -117,14 +117,14 @@ docker run -p 8080:8080 -v "$(pwd):/model" nshmp-haz-ws Open browser to [http://localhost:8080/](http://localhost:8080/). -### Run from Docker Hub +### Run from Container Registry -A public Docker image is avaialable on [Docker Hub](https://hub.docker.com/r/usgs/nshmp-haz-ws) +A public Docker image is avaialable from this repository's +[container registry](https://code.usgs.gov/ghsc/nshmp/nshmp-haz/container_registry). There are 3 main tags: -* `latest`: Refers to the -[main](https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/tree/main) branch and is the latest updates +* `latest`: Refers to the latest updates from the main or production branch * `staging-latest`: Refers to the [main](https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/tree/main) branch and is the latest updates * `production-latest`: Refers to the @@ -132,28 +132,28 @@ There are 3 main tags: ```bash # Pull image -docker pull nshmp-haz-ws:latest +docker pull code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz-ws:latest # Run -docker run -p 8080:8080 -v "/path/to/model:/model" nshmp-haz-ws +docker run -p 8080:8080 -v "/path/to/model:/model" code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz-ws ``` Web service runs on [http://localhost:8080/](http://localhost:8080/) The hazard model is read in via Docker volumes. -#### Docker Hub Example with NSHM +#### Container Registry Example with NSHM ```bash # Pull image -docker pull nshmp-haz-ws:latest +docker pull code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz-ws:latest # Download NSHM CONUS cd .. git clone https://code.usgs.gov/ghsc/nshmp/nshms/nshm-conus # Run web services -docker run -p 8080:8080 -v "$(pwd):/model" nshmp-haz-ws +docker run -p 8080:8080 -v "$(pwd):/model" code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz-ws ``` Open browser to [http://localhost:8080/](http://localhost:8080/).