Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
geomag-algorithms
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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 Geomagnetism Program
geomag-algorithms
Commits
c6610342
Commit
c6610342
authored
8 years ago
by
Jeremy M Fee
Browse files
Options
Downloads
Patches
Plain Diff
Initial dockerfile
parent
ae41d988
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.dockerignore
+4
-0
4 additions, 0 deletions
.dockerignore
Dockerfile
+53
-0
53 additions, 0 deletions
Dockerfile
docs/install_docker.md
+59
-0
59 additions, 0 deletions
docs/install_docker.md
with
116 additions
and
0 deletions
.dockerignore
0 → 100644
+
4
−
0
View file @
c6610342
.DS_Store
node_modules
*.pyc
conf
This diff is collapsed.
Click to expand it.
Dockerfile
0 → 100644
+
53
−
0
View file @
c6610342
FROM
debian:jessie
MAINTAINER
Jeremy Fee <jmfee@usgs.gov>
LABEL
usgs.geomag-algorithms.version=0.2.0
# update os
RUN
apt-get update
--fix-missing
&&
\
apt-get
install
-y
--no-install-recommends
\
bzip2
\
ca-certificates
\
curl
\
gcc
\
libcurl4-gnutls-dev
\
libglib2.0-0
\
libgnutls28-dev
\
libsm6
\
libxext6
\
libxrender1
&&
\
apt-get clean
ENV
PATH /conda/bin:$PATH
# install conda and install obspy
RUN
echo
'export PATH=/conda/bin:$PATH'
>
/etc/profile.d/conda.sh
&&
\
curl https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh
\
-o
~/miniconda.sh
&&
\
/bin/bash ~/miniconda.sh
-b
-p
/conda
&&
\
rm
~/miniconda.sh
&&
\
conda config
--add
channels obspy
&&
\
conda
install
--yes
jupyter obspy
&&
\
conda clean
-i
-l
-t
-y
&&
\
pip
install
pycurl
# copy library (ignores set in .dockerignore)
COPY
. /geomag-algorithms
RUN
pip
install
/geomag-algorithms
&&
\
mkdir
/notebooks
WORKDIR
/geomag-algorithms
EXPOSE
80
CMD
/bin/bash -c " \
exec jupyter notebook \
--ip='*' \
--notebook-dir=/notebooks \
--no-browser \
--port=80 \
"
This diff is collapsed.
Click to expand it.
docs/install_docker.md
0 → 100644
+
59
−
0
View file @
c6610342
## Docker
https://www.docker.com/
Docker containers bundle all dependencies needed to use geomag-algorithms.
The container includes a Jupyter Notebook server for interactive development.
> Docker images are built using the `Dockerfile` at the root of this project.
### Create a new docker container
The following command creates and starts a container.
```
docker run -d --name geomagio -p 8000:80 usgs/geomag-algorithms
```
-
`-d`
runs container in the background
-
`-name geomagio`
assigns the name
`geomagio`
-
`-p 8000:80`
forwards system port
`8000`
to container port
`80`
-
`usgs/geomag-algorithms:latest`
refers to the
latest version of the geomag-algorithms docker image
> Notebooks are stored in the container in the directory `/notebooks`
### Use the container
-
Start a stopped container:
```
docker start geomagio
```
-
Run an interactive python prompt
```
docker exec -it geomagio python
```
-
Use the Jupyter Notebook server
```
open http://localhost:8000/
```
-
Use the
`geomag.py`
command line interface
```
docker exec -it geomagio geomag.py \
--inchannels H E Z F \
--input edge \
--interval minute \
--observatory BOU \
--output iaga2002 \
--output-stdout \
--starttime 2016-07-04T00:00:00Z \
--endtime 2016-07-04T23:59:00Z
```
-
Stop a running container:
```
docker stop geomagio
```
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