From 6c8cadace66a2dc0e5f514b491a0a9b5f3cd2cd8 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Thu, 10 Sep 2020 18:25:18 +0200 Subject: [PATCH] add docker builds for uhd and red pitaya --- docker/Dockerfiles/Dockerfile-full | 2 + docker/Dockerfiles/Dockerfile-redpitaya | 8 ++++ docker/Dockerfiles/Dockerfile-uhd | 8 ++++ docker/env | 2 +- .../scripts/install-dependencies-redpitaya.sh | 32 ++++++++++++++ docker/scripts/install-dependencies-uhd.sh | 43 +++++++++++++++++++ 6 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 docker/Dockerfiles/Dockerfile-redpitaya create mode 100644 docker/Dockerfiles/Dockerfile-uhd create mode 100755 docker/scripts/install-dependencies-redpitaya.sh create mode 100755 docker/scripts/install-dependencies-uhd.sh diff --git a/docker/Dockerfiles/Dockerfile-full b/docker/Dockerfiles/Dockerfile-full index 7965e1f..3a38c9f 100644 --- a/docker/Dockerfiles/Dockerfile-full +++ b/docker/Dockerfiles/Dockerfile-full @@ -17,6 +17,8 @@ RUN /install-dependencies-rtlsdr.sh &&\ /install-dependencies-perseus.sh &&\ /install-dependencies-fcdpp.sh &&\ /install-dependencies-radioberry.sh &&\ + /install-dependencies-uhd.sh &&\ + /install-dependencies-redpitaya.sh &&\ /install-connectors.sh &&\ rm /install-dependencies-*.sh &&\ rm /install-lib.*.patch && \ diff --git a/docker/Dockerfiles/Dockerfile-redpitaya b/docker/Dockerfiles/Dockerfile-redpitaya new file mode 100644 index 0000000..7d389aa --- /dev/null +++ b/docker/Dockerfiles/Dockerfile-redpitaya @@ -0,0 +1,8 @@ +ARG ARCHTAG +FROM openwebrx-soapysdr-base:$ARCHTAG + +COPY docker/scripts/install-dependencies-redpitaya.sh / +RUN /install-dependencies-redpitaya.sh &&\ + rm /install-dependencies-redpitaya.sh + +COPY . /opt/openwebrx diff --git a/docker/Dockerfiles/Dockerfile-uhd b/docker/Dockerfiles/Dockerfile-uhd new file mode 100644 index 0000000..ae1e758 --- /dev/null +++ b/docker/Dockerfiles/Dockerfile-uhd @@ -0,0 +1,8 @@ +ARG ARCHTAG +FROM openwebrx-soapysdr-base:$ARCHTAG + +COPY docker/scripts/install-dependencies-uhd.sh / +RUN /install-dependencies-uhd.sh &&\ + rm /install-dependencies-uhd.sh + +COPY . /opt/openwebrx diff --git a/docker/env b/docker/env index daa5e10..6481d1f 100644 --- a/docker/env +++ b/docker/env @@ -1,5 +1,5 @@ ARCH=$(uname -m) -IMAGES="openwebrx-rtlsdr openwebrx-sdrplay openwebrx-hackrf openwebrx-airspy openwebrx-rtlsdr-soapy openwebrx-plutosdr openwebrx-limesdr openwebrx-soapyremote openwebrx-perseus openwebrx-fcdpp openwebrx-radioberry openwebrx-full openwebrx" +IMAGES="openwebrx-rtlsdr openwebrx-sdrplay openwebrx-hackrf openwebrx-airspy openwebrx-rtlsdr-soapy openwebrx-plutosdr openwebrx-limesdr openwebrx-soapyremote openwebrx-perseus openwebrx-fcdpp openwebrx-radioberry openwebrx-uhd openwebrx-redpitaya openwebrx-full openwebrx" ALL_ARCHS="x86_64 armv7l aarch64" TAG=${TAG:-"latest"} ARCHTAG="$TAG-$ARCH" diff --git a/docker/scripts/install-dependencies-redpitaya.sh b/docker/scripts/install-dependencies-redpitaya.sh new file mode 100755 index 0000000..e88b5c8 --- /dev/null +++ b/docker/scripts/install-dependencies-redpitaya.sh @@ -0,0 +1,32 @@ +#!/bin/bash +set -euo pipefail +export MAKEFLAGS="-j4" + +function cmakebuild() { + cd $1 + if [[ ! -z "${2:-}" ]]; then + git checkout $2 + fi + mkdir build + cd build + cmake .. + make + make install + cd ../.. + rm -rf $1 +} + +cd /tmp + +STATIC_PACKAGES="" +BUILD_PACKAGES="git cmake make gcc g++" + +apt-get update +apt-get -y install --no-install-recommends $STATIC_PACKAGES $BUILD_PACKAGES + +git clone https://github.com/pothosware/SoapyRedPitaya.git +cmakebuild SoapyRedPitaya soapy-redpitaya-0.1.1 + +SUDO_FORCE_REMOVE=yes apt-get -y purge --autoremove $BUILD_PACKAGES +apt-get clean +rm -rf /var/lib/apt/lists/* diff --git a/docker/scripts/install-dependencies-uhd.sh b/docker/scripts/install-dependencies-uhd.sh new file mode 100755 index 0000000..747c024 --- /dev/null +++ b/docker/scripts/install-dependencies-uhd.sh @@ -0,0 +1,43 @@ +#!/bin/bash +set -euo pipefail +export MAKEFLAGS="-j4" + +function cmakebuild() { + cd $1 + if [[ ! -z "${2:-}" ]]; then + git checkout $2 + fi + mkdir build + cd build + cmake .. + make + make install + cd ../.. + rm -rf $1 +} + +cd /tmp + +STATIC_PACKAGES="libboost-chrono1.67.0 libboost-date-time1.67.0 libboost-filesystem1.67.0 libboost-program-options1.67.0 libboost-regex1.67.0 libboost-test1.67.0 libboost-serialization1.67.0 libboost-thread1.67.0 libboost-system1.67.0 python3-numpy python3-mako" +BUILD_PACKAGES="git cmake make gcc g++ libboost-dev libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev libboost-program-options-dev libboost-regex-dev libboost-test-dev libboost-serialization-dev libboost-thread-dev libboost-system-dev" + +apt-get update +apt-get -y install --no-install-recommends $STATIC_PACKAGES $BUILD_PACKAGES + +git clone https://github.com/EttusResearch/uhd.git +# 3.15.0.0 Release +mkdir -p uhd/host/build +cd uhd/host/build +git checkout v3.15.0.0 +cmake .. +make +make install +cd ../../.. +rm -rf uhd + +git clone https://github.com/pothosware/SoapyUHD.git +cmakebuild SoapyUHD 3488a7f994b0d10e50cd3b542cfc7cab9d2d9c05 + +SUDO_FORCE_REMOVE=yes apt-get -y purge --autoremove $BUILD_PACKAGES +apt-get clean +rm -rf /var/lib/apt/lists/*