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
ad7b18a7
Commit
ad7b18a7
authored
5 months ago
by
Clayton, Brandon Scott
Browse files
Options
Downloads
Patches
Plain Diff
update docker docs
parent
61bdf12b
No related branches found
No related tags found
1 merge request
!791
Docker readme
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/pages/Using-Docker.md
+26
-31
26 additions, 31 deletions
docs/pages/Using-Docker.md
with
26 additions
and
31 deletions
docs/pages/Using-Docker.md
+
26
−
31
View file @
ad7b18a7
# Using [Docker](https://docs.docker.com/install/)
*nshmp-haz*
is available as a public image from
[
Docker hub
](
https://hub.docker.com/r/usgs/nshmp-haz
)
with tags:
*nshmp-haz*
is available as a public image from
the
[
GitLab registry
](
https://code.usgs.gov/ghsc/nshmp/nshmp-haz/container_registry/69
)
with tags:
*
`latest`
: Refers to the latest updates from the main or production branch
*
`development-latest`
: Refers to forks of the repository.
*
`staging-latest`
: Latest updates associated with the
*
`latest`
,
`staging-latest`
: Latest updates associated with the
[
main
](
https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/tree/main
)
branch
*
`production-latest`
: Latest stable release associated with
the
[
production
](
https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/t
ree/production
)
branch
*
`production-latest`
: Latest stable release associated with
a
[
tag
](
https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/t
ags
)
To ensure you have the latest
*nshmp-haz*
update associated with a specific tag,
always first pull the image from Docker:
```
bash
docker pull
usgs
/nshmp-haz:<tag>
docker pull
code.usgs.gov:5001/ghsc/nshmp/nshmp-haz
/nshmp-haz:<tag>
```
> Replace `<tag>` with one of the above tags.
...
...
@@ -22,7 +20,7 @@ docker pull usgs/nshmp-haz:<tag>
Example:
```
bash
docker pull
usgs/nshmp-haz:production-
latest
docker pull
code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz:
latest
```
## Docker Memory on Mac
...
...
@@ -35,7 +33,7 @@ to a minimum of 4 GB.
```
bash
# Pull docker image
docker pull
usgs
/nshmp-haz:latest
docker pull
code.usgs.gov:5001/ghsc/nshmp/nshmp-haz
/nshmp-haz:latest
# Run docker image
docker run
\
...
...
@@ -45,7 +43,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
```
Where:
...
...
@@ -78,7 +76,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:latest
docker pull
code.usgs.gov:5001/ghsc/nshmp/nshmp-haz
/nshmp-haz:latest
# Run nshmp-haz HazardCalc
docker run
\
...
...
@@ -86,7 +84,7 @@ docker run \
--volume
"
$(
pwd
)
/nshm-hawaii:/app/model"
\
--volume
"
$(
pwd
)
/sites.geojson:/app/sites.geojson"
\
--volume
"
$(
pwd
)
/hawaii-hazard-output:/app/output"
\
usgs
/nshmp-haz
code.usgs.gov:5001/ghsc/nshmp/nshmp-haz
/nshmp-haz
```
### [`DisaggCalc`](../../src/main/java/gov/usgs/earthquake/nshmp/DisaggCalc.java) Example
...
...
@@ -100,7 +98,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:latest
docker pull
code.usgs.gov:5001/ghsc/nshmp/nshmp-haz
/nshmp-haz:latest
# Run nshmp-haz DisaggCalc
docker run
\
...
...
@@ -109,7 +107,7 @@ docker run \
--volume
"
$(
pwd
)
/nshm-hawaii:/app/model"
\
--volume
"
$(
pwd
)
/sites.geojson:/app/sites.geojson"
\
--volume
"
$(
pwd
)
/hawaii-disagg-output:/app/output"
\
usgs/nshmp-haz:latest
code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz
```
### [`RateCalc`](../../src/main/java/gov/usgs/earthquake/nshmp/RateCalc.java) Example
...
...
@@ -123,7 +121,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:latest
docker pull
code.usgs.gov:5001/ghsc/nshmp/nshmp-haz
/nshmp-haz:latest
# Run nshmp-haz RateCalc
docker run
\
...
...
@@ -131,7 +129,7 @@ docker run \
--volume
"
$(
pwd
)
/nshm-hawaii:/app/model"
\
--volume
"
$(
pwd
)
/sites.geojson:/app/sites.geojson"
\
--volume
"
$(
pwd
)
/hawaii-rate-output:/app/output"
\
usgs/nshmp-haz
code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz:latest
```
## Run Customization
...
...
@@ -143,13 +141,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:
...
...
@@ -195,23 +193,20 @@ Open browser to [http://localhost:8080/](http://localhost:8080/).
### Run from Container Registry
A public Docker image is avaialable from
[
Docker hub
](
https://hub.docker.com/r/usgs/nshmp-haz-ws
)
.
A public Docker image is avaialable from the
[
Gitlab registry
](
https://code.usgs.gov/ghsc/nshmp/nshmp-haz/container_registry/68
)
with tags:
There are 4 main tags:
*
`latest`
: Refers to the latest updates from the main or production branch
*
`development-latest`
: Refers to forks of the repository.
*
`staging-latest`
: Refers to the
*
`latest`
,
`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
[
production
](
https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/t
ree/production
)
branch
and is stable
*
`production-latest`
: Refers to the
latest
[
tag
](
https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/t
ags
)
and is stable
```
bash
# Pull image
docker pull
usgs
/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"
usgs
/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/
)
...
...
@@ -222,14 +217,14 @@ The hazard model is read in via Docker volumes.
```
bash
# Pull image
docker pull
usgs
/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"
usgs
/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/
)
.
...
...
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