Skip to content

Commit

Permalink
Docker updates for wiki (#464)
Browse files Browse the repository at this point in the history
tweaks to docker and add sample NOAA config file
  • Loading branch information
charlie-foxtrot authored Feb 6, 2024
1 parent 5eb6139 commit 281d7b6
Show file tree
Hide file tree
Showing 3 changed files with 158 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"${workspaceFolder}/build/_deps/googletest-src/googletest/include/"
"${workspaceFolder}/build/_deps/googletest-src/googletest/include/",
"${workspaceFolder}/build/src/"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
Expand Down
23 changes: 12 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ RUN apt-get update && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# set working dir for building rtl-sdr support
WORKDIR /rtl_sdr_build
# set working dir for compiling dependencies
WORKDIR /build_dependencies

# compile / install rtl-sdr-blog version of rtl-sdr for v4 support
RUN git clone https://github.com/rtlsdrblog/rtl-sdr-blog && \
Expand Down Expand Up @@ -88,7 +88,7 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# install (from build container) rtl-sdr-blog version of rtl-sdr for v4 support
COPY --from=build /rtl_sdr_build/librtlsdr0_*.deb /rtl_sdr_build/librtlsdr-dev_*.deb /rtl_sdr_build/rtl-sdr_*.deb /tmp/
COPY --from=build /build_dependencies/librtlsdr0_*.deb /build_dependencies/librtlsdr-dev_*.deb /build_dependencies/rtl-sdr_*.deb /tmp/
RUN dpkg -i /tmp/librtlsdr0_*.deb && \
dpkg -i /tmp/librtlsdr-dev_*.deb && \
dpkg -i /tmp/rtl-sdr_*.deb && \
Expand All @@ -98,18 +98,19 @@ RUN dpkg -i /tmp/librtlsdr0_*.deb && \
echo 'blacklist rtl2832' | tee --append /etc/modprobe.d/rtl_sdr.conf && \
echo 'blacklist rtl2830' | tee --append /etc/modprobe.d/rtl_sdr.conf

# install (from build container) libmirisdr-4
# copy (from build container) libmirisdr-4 library
COPY --from=build /usr/local/lib/libmirisdr.so.4 /usr/local/lib/

# Copy rtl_airband from the build container
COPY LICENSE /opt/rtl_airband/
COPY --from=build /rtl_airband_build/build_dir/src/unittests /opt/rtl_airband/
COPY --from=build /rtl_airband_build/build_dir/src/rtl_airband /opt/rtl_airband/
RUN chmod a+x /opt/rtl_airband/unittests /opt/rtl_airband/rtl_airband
COPY LICENSE /app/
COPY --from=build /rtl_airband_build/build_dir/src/unittests /app/
COPY --from=build /rtl_airband_build/build_dir/src/rtl_airband /app/
RUN chmod a+x /app/unittests /app/rtl_airband

# make sure unit tests pass
RUN /opt/rtl_airband/unittests
RUN /app/unittests

# Use tini as init and run rtl_airband
# Use tini as init and run rtl_airband from /app/
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["/opt/rtl_airband/rtl_airband", "-F", "-e"]
WORKDIR /app/
CMD ["/app/rtl_airband", "-F", "-e", "-c", "/app/rtl_airband.conf"]
144 changes: 144 additions & 0 deletions config/noaa.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
fft_size = 1024;
localtime = true;
multiple_demod_threads = true;
multiple_output_threads = true;
devices:
(
{
type = "rtlsdr";
index = 0;
gain = 19.7;
centerfreq = 162.48200;
correction = 0;
sample_rate = 2.40;
channels:
(
{
freq = 162.40000;
label = "NOAA 162.400";
modulation = "nfm";
lowpass = -1;
highpass = -1;
bandwidth = 5000;
ampfactor = 2.00;
squelch_snr_threshold = 0.00;
outputs:
(
{
type = "file";
directory = "/recordings";
filename_template = "NOAA_162.400";
}
);
},
{
freq = 162.42500;
label = "NOAA 162.425";
modulation = "nfm";
lowpass = -1;
highpass = -1;
bandwidth = 5000;
ampfactor = 2.00;
squelch_snr_threshold = 0.00;
outputs:
(
{
type = "file";
directory = "/recordings";
filename_template = "NOAA_162.425";
}
);
},
{
freq = 162.45000;
label = "NOAA 162.450";
modulation = "nfm";
lowpass = -1;
highpass = -1;
bandwidth = 5000;
ampfactor = 2.00;
squelch_snr_threshold = 0.00;
outputs:
(
{
type = "file";
directory = "/recordings";
filename_template = "NOAA_162.450";
}
);
},
{
freq = 162.47500;
label = "NOAA 162.475";
modulation = "nfm";
lowpass = -1;
highpass = -1;
bandwidth = 5000;
ampfactor = 2.00;
squelch_snr_threshold = 0.00;
outputs:
(
{
type = "file";
directory = "/recordings";
filename_template = "NOAA_162.475";
}
);
},
{
freq = 162.50000;
label = "NOAA 162.500";
modulation = "nfm";
lowpass = -1;
highpass = -1;
bandwidth = 5000;
ampfactor = 2.00;
squelch_snr_threshold = 0.00;
outputs:
(
{
type = "file";
directory = "/recordings";
filename_template = "NOAA_162.500";
}
);
},
{
freq = 162.52500;
label = "NOAA 162.525";
modulation = "nfm";
lowpass = -1;
highpass = -1;
bandwidth = 5000;
ampfactor = 2.00;
squelch_snr_threshold = 0.00;
outputs:
(
{
type = "file";
directory = "/recordings";
filename_template = "NOAA_162.525";
}
);
},
{
freq = 162.55000;
label = "NOAA 162.550";
modulation = "nfm";
lowpass = -1;
highpass = -1;
bandwidth = 5000;
ampfactor = 2.00;
squelch_snr_threshold = 0.00;
outputs:
(
{
type = "file";
directory = "/recordings";
filename_template = "NOAA_162.550";
}
);
}
);
}
);

0 comments on commit 281d7b6

Please sign in to comment.