To build the docker image, run the following command from the root of the project directory (after docker is installed and configured):
docker build -t geomagpy/magpy:latest .
To run the built image, run the following command:
docker run -d --name magpy -p 8000:8000 geomagpy/magpy:latest
Then open http://localhost:8000 in a web browser to access the jupiter notebook server. In a new notebook, I was able to run the following python commands to verify the notebook works:
%matplotlib inline
from magpy.stream import read
timeseries = read('http://geomag.usgs.gov/ws/edge/?id=BOU')
timeseries.plot()
I also recommend setting up the docker hub ( https://hub.docker.com/ ) user/organization account "geomagpy" where you can then publish this image for other users using a command similar to:
Files to automate docker container image build.
To build the docker image, run the following command from the root of the project directory (after docker is installed and configured):
To run the built image, run the following command:
Then open
http://localhost:8000
in a web browser to access the jupiter notebook server. In a new notebook, I was able to run the following python commands to verify the notebook works:I also recommend setting up the docker hub ( https://hub.docker.com/ ) user/organization account "geomagpy" where you can then publish this image for other users using a command similar to: