Skip to content

Commit

Permalink
Added multi architecture docker build.
Browse files Browse the repository at this point in the history
  • Loading branch information
shajen committed Feb 9, 2023
1 parent ef7ffd4 commit d1fda7c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,20 @@ jobs:
uses: actions/checkout@v3
- name: Docker info
run: docker info
- name: Build docker image
- name: Build sdr-scanner
run: |
echo "constexpr auto GIT_COMMIT = \"$(git rev-parse HEAD)\";" > sources/version.h
echo "constexpr auto GIT_TAG = \"$(git describe --tags)\";" >> sources/version.h
docker build -t sdr-scanner-test -f Dockerfile . --target test
docker build -t sdr-scanner -f Dockerfile .
docker build -t sdr-scanner-test --target test .
docker build -t sdr-scanner .
- name: Test sdr-scanner
run: docker run --rm sdr-scanner-test
- name: Run sdr-scanner
run: docker run --rm sdr-scanner
- name: Deploy sdr-scanner tag
- name: Deploy sdr-scanner
if: github.ref_type == 'tag'
run: |
TAG=${GITHUB_REF_NAME/v/}
docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} -p ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} docker.io
docker image tag sdr-scanner docker.io/shajen/sdr-scanner:$TAG
docker image tag sdr-scanner docker.io/shajen/sdr-scanner
docker push docker.io/shajen/sdr-scanner:$TAG
docker push docker.io/shajen/sdr-scanner
docker buildx create --use || true
docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 -t docker.io/shajen/sdr-scanner:$TAG -t docker.io/shajen/sdr-scanner --push .
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ blacklist rtl2832_sdr
blacklist rtl8xxxu
```

## RaspberryPi

Docker version should work on `RaspberryPi`, but keep in mind that `RaspberryPi` is **not powefull machine** and is **not good** for sdr data processing. `sdr` device can produce **40 megabytes per second**! It's a lot of data for `RaspberryPi` to processing in real time. It's a lot of data even for some desktop computers.

If you still want to do this, please replace the `SD` card with a fast one and make sure you have a strong version of `RaspberryPi`.

Better idea is to build `sdr-scanner` from sources via `cmake` and run natively on `RaspberryPi`. Next run `sdr-monitor` and `mqtt-broker` on any other machine (even in the cloud) and connect `sdr-scanner` to them (you have to set valid mqtt data in `config.json` and maybe manipulate in `docker-compose.yml`).

## Noise learner

To auto-detect transmissions, sdr scanner has to learn noise level every run. It takes first `n` seconds (defined in `config.json` as `noise_learning_time_seconds` default is `30` seconds). So if any transmission will appear in this period it's may not be detected by scanner later.
Expand Down

0 comments on commit d1fda7c

Please sign in to comment.