Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nshmp-haz
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ghsc
National Seismic Hazard Model Project
nshmp-haz
Commits
d5108553
Commit
d5108553
authored
2 years ago
by
Clayton, Brandon Scott
Browse files
Options
Downloads
Patches
Plain Diff
update docker path
parent
6519dea8
No related branches found
No related tags found
2 merge requests
!611
Production Release | nshmp-haz
,
!610
Resolves - Update docker deployments
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/pages/Building-&-Running.md
+16
-11
16 additions, 11 deletions
docs/pages/Building-&-Running.md
docs/pages/Web-Services.md
+10
-10
10 additions, 10 deletions
docs/pages/Web-Services.md
with
26 additions
and
21 deletions
docs/pages/Building-&-Running.md
+
16
−
11
View file @
d5108553
...
@@ -107,11 +107,16 @@ to a minimum of 4 GB.
...
@@ -107,11 +107,16 @@ to a minimum of 4 GB.
### Run nshmp-haz in Docker
### Run nshmp-haz in Docker
The
*nshmp-haz*
application may be run as a Docker container which mitigates the need to install
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
Git, Java, or other dependencies besides Docker. A public image is available
Docker hub at
[
https://hub.docker.com/r/usgs/nshmp-haz
](
https://hub.docker.com/r/usgs/nshmp-haz
)
from this repository's
[
container registry
](
https://code.usgs.gov/ghsc/nshmp/nshmp-haz/container_registry
)
.
which can be run with:
which can be run with:
```
bash
```
bash
# Pull docker image
docker pull code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz:latest
# Run docker image
docker run
\
docker run
\
--env
CLASS_NAME
=
<DisaggCalc | HazardCalc | RateCalc>
\
--env
CLASS_NAME
=
<DisaggCalc | HazardCalc | RateCalc>
\
--env
IML
=
<NUMBER>
\
--env
IML
=
<NUMBER>
\
...
@@ -119,7 +124,7 @@ docker run \
...
@@ -119,7 +124,7 @@ docker run \
--volume
/absolute/path/to/sites/file:/app/sites.<geojson | csv>
\
--volume
/absolute/path/to/sites/file:/app/sites.<geojson | csv>
\
--volume
/absolute/path/to/config/file:/app/config.json
\
--volume
/absolute/path/to/config/file:/app/config.json
\
--volume
/absolute/path/to/output:/app/output
\
--volume
/absolute/path/to/output:/app/output
\
usgs/nshmp-haz
code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz-ws
```
```
Where:
Where:
...
@@ -152,7 +157,7 @@ assumption a GeoJSON [site](./Site-Specification.md) file exists named `sites.ge
...
@@ -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
git clone https://code.usgs.gov/ghsc/nshmp/nshms/nshm-hawaii.git
# Pull image
# 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
# Run nshmp-haz HazardCalc
docker run
\
docker run
\
...
@@ -160,7 +165,7 @@ docker run \
...
@@ -160,7 +165,7 @@ docker run \
--volume
"
$(
pwd
)
/nshm-hawaii:/app/model"
\
--volume
"
$(
pwd
)
/nshm-hawaii:/app/model"
\
--volume
"
$(
pwd
)
/sites.geojson"
\
--volume
"
$(
pwd
)
/sites.geojson"
\
--volume
"
$(
pwd
)
/hawaii-hazard-output:/app/output"
\
--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
#### [`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
...
@@ -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
git clone https://code.usgs.gov/ghsc/nshmp/nshms/nshm-hawaii.git
# Pull image
# 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
# Run nshmp-haz DisaggCalc
docker run
\
docker run
\
...
@@ -183,7 +188,7 @@ docker run \
...
@@ -183,7 +188,7 @@ docker run \
--volume
"
$(
pwd
)
/nshm-hawaii:/app/model"
\
--volume
"
$(
pwd
)
/nshm-hawaii:/app/model"
\
--volume
"
$(
pwd
)
/sites.geojson"
\
--volume
"
$(
pwd
)
/sites.geojson"
\
--volume
"
$(
pwd
)
/hawaii-disagg-output:/app/output"
\
--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
#### [`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
...
@@ -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
git clone https://code.usgs.gov/ghsc/nshmp/nshms/nshm-hawaii.git
# Pull image
# 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
# Run nshmp-haz RateCalc
docker run
\
docker run
\
...
@@ -205,7 +210,7 @@ docker run \
...
@@ -205,7 +210,7 @@ docker run \
--volume
"
$(
pwd
)
/nshm-hawaii:/app/model"
\
--volume
"
$(
pwd
)
/nshm-hawaii:/app/model"
\
--volume
"
$(
pwd
)
/sites.geojson"
\
--volume
"
$(
pwd
)
/sites.geojson"
\
--volume
"
$(
pwd
)
/hawaii-rate-output:/app/output"
\
--volume
"
$(
pwd
)
/hawaii-rate-output:/app/output"
\
usgs/nshmp-haz:production-latest
code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz
```
```
### Run Customization
### Run Customization
...
@@ -217,13 +222,13 @@ be set with the environment flag (-e, -env):
...
@@ -217,13 +222,13 @@ be set with the environment flag (-e, -env):
docker run
\
docker run
\
--env
JAVA_MEMORY
=
<MEMORY>
\
--env
JAVA_MEMORY
=
<MEMORY>
\
...
...
usgs
/nshmp-haz
code.usgs.gov:5001/ghsc/nshmp/nshmp-haz
/nshmp-haz
# Example
# Example
docker run
\
docker run
\
--env
JAVA_MEMORY
=
"12g"
\
--env
JAVA_MEMORY
=
"12g"
\
...
...
usgs
/nshmp-haz
code.usgs.gov:5001/ghsc/nshmp/nshmp-haz
/nshmp-haz
```
```
Where:
Where:
...
...
This diff is collapsed.
Click to expand it.
docs/pages/Web-Services.md
+
10
−
10
View file @
d5108553
...
@@ -80,7 +80,7 @@ to a minimum of 4 GB.
...
@@ -80,7 +80,7 @@ to a minimum of 4 GB.
### Docker Build Options
### Docker Build Options
*
[
Build and run docker locally
](
#build-and-run-docker-locally
)
*
[
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
### Build and Run Docker Locally
...
@@ -117,14 +117,14 @@ docker run -p 8080:8080 -v "$(pwd):/model" nshmp-haz-ws
...
@@ -117,14 +117,14 @@ docker run -p 8080:8080 -v "$(pwd):/model" nshmp-haz-ws
Open browser to
[
http://localhost:8080/
](
http://localhost:8080/
)
.
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:
There are 3 main tags:
*
`latest`
: Refers to the
*
`latest`
: Refers to the latest updates from the main or production branch
[
main
](
https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/tree/main
)
branch and is the latest updates
*
`staging-latest`
: Refers to the
*
`staging-latest`
: Refers to the
[
main
](
https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/tree/main
)
branch and is the latest updates
[
main
](
https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/tree/main
)
branch and is the latest updates
*
`production-latest`
: Refers to the
*
`production-latest`
: Refers to the
...
@@ -132,28 +132,28 @@ There are 3 main tags:
...
@@ -132,28 +132,28 @@ There are 3 main tags:
```
bash
```
bash
# Pull image
# Pull image
docker pull nshmp-haz-ws:latest
docker pull
code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/
nshmp-haz-ws:latest
# Run
# 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/
)
Web service runs on
[
http://localhost:8080/
](
http://localhost:8080/
)
The hazard model is read in via Docker volumes.
The hazard model is read in via Docker volumes.
####
Docker Hub
Example with NSHM
####
Container Registry
Example with NSHM
```
bash
```
bash
# Pull image
# 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
# Download NSHM CONUS
cd
..
cd
..
git clone https://code.usgs.gov/ghsc/nshmp/nshms/nshm-conus
git clone https://code.usgs.gov/ghsc/nshmp/nshms/nshm-conus
# Run web services
# 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/
)
.
Open browser to
[
http://localhost:8080/
](
http://localhost:8080/
)
.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment