Skip to content

Commit 288a350

Browse files
authored
Merge pull request #3 from jmsaurel/main
Update README to use docker-compose
2 parents e9756ee + 666c9aa commit 288a350

File tree

2 files changed

+35
-30
lines changed

2 files changed

+35
-30
lines changed

README.md

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# seiscomp-gui-docker
2-
SeisComP scolv GUI utility in a docker container
2+
SeisComP GUI utilities in a docker container
33

44
## Mac install
55

@@ -24,61 +24,66 @@ Start Docker Desktop (Applications folder) : it will start the docker daemon.
2424

2525
## Building and running Docker container
2626

27-
### Build Docker image
27+
### Build image and create container
2828

29-
#### On Mac with an Apple Silicon (ARM64) processor
29+
#### Update configuration
30+
The file `compose.yaml` contains instructions to mount host
31+
directories on the container.
32+
Typically, when using SeiSComP GUI, you would need :
33+
* a directory containing `.cfg` personal configuration files for each application
34+
* a directory containing map tiles
35+
* directories containing travel time files for locators
3036

31-
Docker Desktop can use Rosetta 2 to emulate x86_64 images on Apple Silicon Macs. Here's how to enable it :
37+
By default, configuration files are expected on `$HOME/seiscomp-gui/cfg` on the host computer. They are mounted on `$HOME/.seiscomp` in the container.
38+
By default, map tiles directory is expected on `$HOME/seiscomp-gui/maps` on the host computer. It is mounted on `/opt/seiscomp/share/maps` in the container.
39+
By default, NonLinLoc configuration and time travel files are expected on `$HOME/seiscomp-gui/nll` on the host computer. It is mounted on `/opt/seiscomp/share/nll` in the container.
40+
By default, Hypo71PC configuration files and velocity models are expected to be found on `$HOME/seiscomp-gui/hypo71` on the host computer. It is mounted on `/opt/seiscomp/share/hypo71` in the container.
3241

33-
- Open Docker Desktop.
34-
- Go to Settings > General.
35-
- Enable the option "Use Rosetta for x86/amd64 emulation on Apple Silicon".
42+
You can update the host path for each volume or comment the unused ones in the `compose.yaml` file, section `volumes`.
3643

37-
Then start building the image :
44+
#### Create image and container
3845

3946
```bash
40-
docker buildx build -t seiscomp-version6:latest --platform linux/amd64 .
47+
docker compose create
4148
```
4249

43-
#### On Mac with an Intel processor
50+
### Run the container
4451

4552
```bash
46-
docker build -t seiscomp-version6:latest .
53+
docker compose start
4754
```
4855

49-
### Create and start container
50-
51-
#### Simple container without configuration
52-
53-
Create and start a simple container without base configuration :
56+
### Stop the container
5457

5558
```bash
56-
docker run -d -p 2222:22 --name scolv seiscomp-version6:latest
59+
docker compose stop
5760
```
5861

59-
#### Pre-configured environment
60-
61-
You can create a "seiscomp" folder and mount it on the container. For example, assuming you have a folder containing the nll configuration and OpenStreetMap maps on your Mac's hard drive in the directory /HOST/PATH/TO/seiscomp/share/, you can create and start a preconfigured container:
62-
63-
```bash
64-
docker run -d -p 2222:22 \
65-
-v /HOST/PATH/TO/seiscomp/share/nll:/opt/seiscomp/share/nll \
66-
-v /HOST/PATH/TO/seiscomp/share/maps/OCMap:/opt/seiscomp/share/maps/OCMap \
67-
-v /HOST/PATH/TO/seiscomp/etc:/home/sysop/.seiscomp \
68-
--name scolv seiscomp-version6:latest
69-
```
62+
## Running SeisComP GUI app
7063

7164
### Connect to container with SSH
7265

7366
```bash
7467
ssh -Y -p 2222 sysop@localhost
7568
```
76-
### Start scolv
69+
### Start scolv (same applies for any other SeisComP GUI)
7770

71+
Without option and with the default container configutation, scolv will use `$HOME/seiscomp-gui/cfg/scolv.cfg` file from the host.
7872
```bash
7973
scolv
8074
```
8175

76+
Scolv can be launched to point to a specific configuration file from `$HOME/seiscomp-gui/cfg/` directory on the host.
77+
```bash
78+
scolv --config-file $HOME/.seiscomp/my_scolv_config_file.cfg
79+
```
80+
### List of SeisComP GUI
81+
* scolv : locator interface
82+
* scrttv : waveform display interface
83+
* scmv : station map interface
84+
* scesv : event interface
85+
* scqcv : station quality check interface
86+
8287
## Credits
8388

8489
This project was inspired by [Fred Massin](https://github.com/FMassin). Many thanks!!

compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
ports:
77
- "2224:22"
88
volumes:
9-
- $HOME/seiscomp-gui/cfg:/home/sysop/.seiscomp/:ro
9+
- $HOME/seiscomp-gui/cfg:/home/sysop/.seiscomp:rw
1010
- $HOME/seiscomp-gui/maps:/opt/seiscomp/share/maps:ro
1111
- $HOME/seiscomp-gui/nll:/opt/seiscomp/share/nll:rw
1212
- $HOME/seiscomp-gui/hypo71:/opt/seiscomp/share/hypo71:rw

0 commit comments

Comments
 (0)