Skip to content

Commit

Permalink
document docker service images
Browse files Browse the repository at this point in the history
fixes #216
  • Loading branch information
casperdcl committed Mar 13, 2019
1 parent 32331c5 commit 466fb2a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 6 deletions.
40 changes: 34 additions & 6 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@

Docker wrapper for CCP PET-MR SIRF.

## TL;DR, I want a (Jupyter notebook) service NOW

1. Install [docker CE][docker-ce] and [`docker-compose`][docker-compose],
2. Run `./SIRF-service.(sh|bat)` (in this folder)
3. Open a browser at <http://localhost:8888>. It may take a few seconds.
The password is `virtual`.
The directory is mounted at `/devel` in the docker container
from `./devel` (in this folder) on the host

[docker-ce]: https://docs.docker.com/install/
[docker-compose]: https://github.com/docker/compose/releases

Note: If on Windows, `localhost` probably won't work.
Find out the service IP address using:
```
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' sirf
```
and use the resultant IP instead of `localhost` (e.g.: `172.18.0.2:8888`).

## Usage

- [SIRF docker source]
+ See also: [SIRF SuperBuild on Docker wiki]
- [Synergistic Image Reconstruction Framework (SIRF) project][SIRF]
Expand All @@ -23,12 +44,19 @@ To pull directly, use:
docker pull ccppetmr/sirf:<DOCKER_TAG>
```

| `<DOCKER_TAG>` | [SuperBuild] branch/tag |
|:--- |:--- |
| `release` | `<latest_tag>` |
| `<tag>` | `<tag>` |
| `latest` | `master` |
| `devel` | `master` with `cmake -DDEVEL_BUILD=ON` |
| `<DOCKER_TAG>` | Service `<DOCKER_TAG>` | [SuperBuild] branch/tag |
|:--- |:--- |:--- |
| `release` | `release-service` | `<latest_tag>` |
| `<tag>` | `<tag>-service` | `<tag>` |
| `latest` | `service` | `master` |
| `devel` | | `master` with `cmake -DDEVEL_BUILD=ON` |

Service images are intended to be run in the background, and expose:

| Port | Notes |
| --- | --- |
| 8888 | `Jupyter` (in folder `/devel`) |
| 9002 | `Gadgetron` |

[dockerhub-SIRF]: https://hub.docker.com/r/ccppetmr/sirf/
[SuperBuild]: https://github.com/CCPPETMR/SIRF-SuperBuild/
2 changes: 2 additions & 0 deletions docker/SIRF-service.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
docker-compose -f docker-compose.yml -f docker-compose.srv.yml up sirf
2 changes: 2 additions & 0 deletions docker/SIRF-service.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
docker-compose -f docker-compose.yml -f docker-compose.nix.yml -f docker-compose.srv.yml up sirf

0 comments on commit 466fb2a

Please sign in to comment.