Skip to content

Commit

Permalink
Merge pull request #1189 from anarkiwi/split
Browse files Browse the repository at this point in the history
move less commonly used services to separate yml, add linting of comp…
  • Loading branch information
anarkiwi authored Mar 6, 2024
2 parents 95abc20 + bc5c5bb commit e3ca015
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 54 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
sox \
uhd-host \
wget \
yamllint \
&& grep -h 'git clone' docker/*|grep -v pytorch|sed -E 's/RUN\s+git clone\s+//g'|sort|uniq|xargs -L1 git clone
- name: install gnuradio
run: |
Expand All @@ -57,6 +58,9 @@ jobs:
poetry install --no-interaction -C utils/mavlink-api && \
poetry install --no-interaction && \
sudo dpkg -r --force-depends python3-numpy
- name: Code Quality - yamllint
run: |
yamllint -s *yml
- name: Code Quality - Black
run: |
poetry run black augment --check
Expand Down
2 changes: 1 addition & 1 deletion docs/4-OPERATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ VOL_PREFIX=/flash/gamutrf docker compose -f orchestrator.yml up mqtt gamutrf wat

### Deploy signal detector
```bash
VOL_PREFIX=/flash/gamutrf FREQ_START=2.4e9 FREQ_END=5.8e9 docker compose -f orchestrator.yml up mqtt gamutrf waterfall sigfinder -d
VOL_PREFIX=/flash/gamutrf FREQ_START=2.4e9 FREQ_END=5.8e9 docker compose -f orchestrator.yml -f sigfinder.yml up mqtt gamutrf waterfall sigfinder -d
```

### Deploy Birdseye
Expand Down
38 changes: 4 additions & 34 deletions orchestrator.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
---
version: "3.3"
networks:
gamutrf:
driver: bridge
driver_opts:
com.docker.network.driver.mtu: 9000
default:
external: true
name: none
services:
compass:
restart: always
Expand Down Expand Up @@ -104,29 +108,6 @@ services:
interval: 10s
timeout: 10s
retries: 3
sigfinder:
restart: always
image: iqtlabs/gamutrf:latest
shm_size: 128m
privileged: true
networks:
- gamutrf
ports:
- '80:80'
- '9002:9000'
volumes:
- '${VOL_PREFIX}:/logs'
command:
- gamutrf-sigfinder
- --scanners=gamutrf:10000
- --log=/logs/scan.log
- --detection_type=narrowband
- --record_secs=1
- --max_recorder_signals=5
- --db_rolling_factor=0
environment:
- "PEAK_TRIGGER=0"
- "PIN_TRIGGER=17"
waterfall:
restart: always
image: iqtlabs/gamutrf-waterfall:latest
Expand All @@ -149,14 +130,3 @@ services:
- --height=6
- --min_freq=0
- --max_freq=0
watchtower:
image: containrrr/watchtower:latest
restart: always
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
environment:
- "WATCHTOWER_POLL_INTERVAL=3600"
- "WATCHTOWER_CLEANUP=true"
- "WATCHTOWER_INCLUDE_RESTARTING=true"
- "WATCHTOWER_INCLUDE_STOPPED=true"
- "WATCHTOWER_REVIVE_STOPPED=true"
28 changes: 28 additions & 0 deletions sigfinder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
version: "3.3"
networks:
gamutrf:
services:
sigfinder:
restart: always
image: iqtlabs/gamutrf:latest
shm_size: 128m
privileged: true
networks:
- gamutrf
ports:
- '80:80'
- '9002:9000'
volumes:
- '${VOL_PREFIX}:/logs'
command:
- gamutrf-sigfinder
- --scanners=gamutrf:10000
- --log=/logs/scan.log
- --detection_type=narrowband
- --record_secs=1
- --max_recorder_signals=5
- --db_rolling_factor=0
environment:
- "PEAK_TRIGGER=0"
- "PIN_TRIGGER=17"
1 change: 1 addition & 0 deletions specgram.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# On Pi4/Ubuntu, also requires systemd.unified_cgroup_hierarchy=0 added to
# /boot/firmware/cmdline.txt, to fall back to cgroup v1.
version: "3.3"
Expand Down
5 changes: 3 additions & 2 deletions torchserve-cuda.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
version: "3.3"
networks:
gamutrf:
driver: bridge
services:
torchserve:
restart: always
Expand All @@ -24,5 +24,6 @@ services:
count: 1
capabilities: [gpu]
command:
# can be multiple models, e.g. mini2_snr=mini2_snr.mar,another_mini2_snr=another_mini2_snr.mar
# can be multiple models
# e.g. mini2_snr=mini2_snr.mar,another_mini2_snr=another_mini2_snr.mar
- --models mini2_snr=mini2_snr.mar
2 changes: 1 addition & 1 deletion torchserve.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
version: "3.3"
networks:
gamutrf:
driver: bridge
services:
torchserve:
restart: always
Expand Down
16 changes: 16 additions & 0 deletions watchtower.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
version: "3.3"
networks:
gamutrf:
services:
watchtower:
image: containrrr/watchtower:latest
restart: always
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
environment:
- "WATCHTOWER_POLL_INTERVAL=3600"
- "WATCHTOWER_CLEANUP=true"
- "WATCHTOWER_INCLUDE_RESTARTING=true"
- "WATCHTOWER_INCLUDE_STOPPED=true"
- "WATCHTOWER_REVIVE_STOPPED=true"
25 changes: 9 additions & 16 deletions worker.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
---
# On Pi4/Ubuntu, also requires systemd.unified_cgroup_hierarchy=0 added to
# /boot/firmware/cmdline.txt, to fall back to cgroup v1.
version: "3.3"
networks:
gamutrf:
default:
external: true
name: none
services:
worker:
restart: always
Expand Down Expand Up @@ -34,19 +38,8 @@ services:
- --rxb=62914560
- '--gain=${GAIN}'
- --qsize=5
#- --rssi_threshold=-110
#- --rssi_throttle=10
#- --use_external_gps
#- --use_external_heading
#- --external_gps_server=$ORCHESTRATOR
watchtower:
image: containrrr/watchtower:latest
restart: always
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
environment:
- "WATCHTOWER_POLL_INTERVAL=3600"
- "WATCHTOWER_CLEANUP=true"
- "WATCHTOWER_INCLUDE_RESTARTING=true"
- "WATCHTOWER_INCLUDE_STOPPED=true"
- "WATCHTOWER_REVIVE_STOPPED=true"
# - --rssi_threshold=-110
# - --rssi_throttle=10
# - --use_external_gps
# - --use_external_heading
# - --external_gps_server=$ORCHESTRATOR

0 comments on commit e3ca015

Please sign in to comment.