New files for running the FM receiver in Docker with audio output: - Dockerfile.gnuradio-audio: GNU Radio image with ALSA→PulseAudio bridge - libasound2-plugins for ALSA PulseAudio plugin - /etc/asound.conf configures ALSA to route to PulseAudio - docker-compose.fm-receiver.yml: Full FM receiver setup - PulseAudio socket mount for audio - USB passthrough for RTL-SDR (requires privileged mode) - XML-RPC port 8090 exposed for tuning control - Environment vars: FREQ_MHZ, GAIN - entrypoint-fm.sh: Builds and runs flowgraph at specified frequency - run-fm-receiver.sh: Helper script with usage instructions Usage: HOST_UID=$(id -u) FREQ_MHZ=107.2 docker compose -f docker/docker-compose.fm-receiver.yml up
23 lines
609 B
Bash
23 lines
609 B
Bash
#!/bin/bash
|
|
# Entrypoint for containerized FM receiver
|
|
set -e
|
|
|
|
FREQ_MHZ=${FREQ_MHZ:-101.1}
|
|
GAIN=${GAIN:-10}
|
|
|
|
python3 -c "
|
|
import sys, subprocess, os
|
|
sys.path.insert(0, '/flowgraphs')
|
|
sys.path.insert(0, '/src')
|
|
from fm_scanner import build_fm_receiver
|
|
|
|
freq = float(os.environ.get('FREQ_MHZ', '101.1'))
|
|
gain = int(os.environ.get('GAIN', '10'))
|
|
|
|
print(f'Building FM receiver for {freq} MHz (gain {gain} dB)...')
|
|
py_path = build_fm_receiver(freq, gain=gain)
|
|
print(f'Launching {py_path.name} — Ctrl+C to stop')
|
|
print(f'XML-RPC control at http://localhost:8090')
|
|
subprocess.run([sys.executable, str(py_path)])
|
|
"
|