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
aa6cdf68
Commit
aa6cdf68
authored
7 years ago
by
Jeremy M Fee
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #180 from jmfee-usgs/v0.4.0
v0.4.0
parents
c003145d
0fedc98b
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
Dockerfile
+25
-32
25 additions, 32 deletions
Dockerfile
README.md
+18
-4
18 additions, 4 deletions
README.md
setup.py
+1
-1
1 addition, 1 deletion
setup.py
with
44 additions
and
37 deletions
Dockerfile
+
25
−
32
View file @
aa6cdf68
FROM
debian:jessie
FROM
usgs/hazdev-base-images:latest-centos
AS
pycurl-build
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
\
# install conda dependencies
RUN
yum
install
-y
\
bzip2
\
ca-certificates
\
curl
\
gcc
\
libcurl4-gnutls-dev
\
libglib2.0-0
\
libgnutls28-dev
\
libsm6
\
libxext6
\
libxrender1
&&
\
apt-get clean
libcurl-devel
\
&&
\
yum clean all
# install conda
ENV
PATH /conda/bin:$PATH
...
...
@@ -27,25 +16,30 @@ RUN echo 'export PATH=/conda/bin:$PATH' > /etc/profile.d/conda.sh && \
/bin/bash ~/miniconda.sh
-b
-p
/conda
&&
\
rm
~/miniconda.sh
# install algorithms and dependencies via conda
RUN
conda config
--set
ssl_verify
$SSL_CERT_FILE
&&
\
conda config
--add
channels obspy
&&
\
conda
install
--yes
jupyter obspy
&&
\
conda clean
-i
-l
-t
-y
&&
\
# build pycurl with SFTP support
export PIP_CERT=$SSL_CERT_FILE && \
export PYCURL_SSL_LIBRARY=nss && \
pip install pycurl
# copy library (ignores set in .dockerignore)
COPY
. /geomag-algorithms
FROM
usgs/hazdev-base-images:latest-centos
MAINTAINER
Jeremy Fee <jmfee@usgs.gov>
LABEL
usgs.geomag-algorithms.version=0.4.0
# configure DOI SSL intercept certificate
# (required when building image from within DOI network)
RUN
mkdir
-p
/usr/local/share/ca-certificates
&&
\
cp
/geomag-algorithms/etc/DOIRootCA2.crt /usr/local/share/ca-certificates/.
&&
\
update-ca-certificates
&&
\
conda config
--set
ssl_verify /etc/ssl/certs/ca-certificates.crt
# use conda install from build container
ENV
PATH /conda/bin:$PATH
COPY
--from=pycurl-build /conda /conda
COPY
--from=pycurl-build /etc/profile.d/conda.sh /etc/profile.d/conda.sh
# copy library (ignores set in .dockerignore)
COPY
. /geomag-algorithms
# install algorithms and dependencies via conda
RUN
conda config
--add
channels obspy
&&
\
conda
install
--yes
jupyter obspy
&&
\
conda clean
-i
-l
-t
-y
&&
\
pip
install
pycurl
&&
\
pip
install
/geomag-algorithms
&&
\
RUN
pip
install
/geomag-algorithms
&&
\
useradd
\
-c
'Docker image user'
\
-m
\
...
...
@@ -55,7 +49,6 @@ RUN conda config --add channels obspy && \
mkdir
-p
/home/geomag_user/notebooks
&&
\
chown
-R
geomag_user:geomag_user /home/geomag_user
USER
geomag_user
WORKDIR
/home/geomag_user
...
...
This diff is collapsed.
Click to expand it.
README.md
+
18
−
4
View file @
aa6cdf68
...
...
@@ -88,10 +88,24 @@ Docker is the simplest install option.
from the image `usgs/geomag-algorithms` on docker hub
```
docker run -d --name geomagio -p 8000:80 usgs/geomag-algorithms
docker run -d --name geomagio -p 8000:80
00
usgs/geomag-algorithms
```
2.
Use the running container
2.
Find the token, (the token improves security)
```
docker logs geomagio
```
This outputs a URL to copy/paste into your browser address bar:
```
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8000/?token=TOKEN
```
3.
Use the running container
-
Run the
`geomag.py`
command line interface:
...
...
@@ -99,10 +113,10 @@ Docker is the simplest install option.
docker exec -it geomagio geomag.py
```
-
Run python interactively in a web browser:
-
Run python interactively in a web browser
(using the token found in step 2)
:
```
open
http://localhost:8000
http://localhost:8000
/?token=TOKEN
```
> In the top right corner, choose "New" then "Python 2"
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
aa6cdf68
...
...
@@ -2,7 +2,7 @@ from distutils.core import setup
setup
(
name
=
'
geomag-algorithms
'
,
version
=
'
0.
3.1
'
,
version
=
'
0.
4.0
'
,
description
=
'
USGS Geomag IO Library
'
,
url
=
'
https://github.com/usgs/geomag-algorithms
'
,
packages
=
[
...
...
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