From ca3aee9877c3f579a2f5b8c9d6083f17419f1e76 Mon Sep 17 00:00:00 2001 From: 30hours Date: Fri, 12 Jan 2024 05:36:02 +0000 Subject: [PATCH] Add UHD to Dockerfile --- Dockerfile | 13 +++++++++++++ docker-compose.yml | 2 ++ 2 files changed, 15 insertions(+) diff --git a/Dockerfile b/Dockerfile index 0a8e395..1a625f5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,10 @@ ADD lib lib RUN apt-get update \ && apt-get install -y g++ make cmake git curl zip unzip doxygen graphviz \ libfftw3-dev pkg-config gfortran \ + # UHD api dependencies + autoconf automake build-essential ccache cpufrequtils ethtool inetutils-tools \ + libboost-all-dev libncurses5 libncurses5-dev libusb-1.0-0 libusb-1.0-0-dev libusb-dev python3-dev \ + python3-mako python3-numpy python3-requests python3-scipy python3-setuptools python3-ruamel.yaml \ && apt-get autoremove -y \ && apt-get clean -y \ && rm -rf /var/lib/apt/lists/* @@ -26,6 +30,15 @@ RUN chmod +x /blah2/lib/sdrplay-3.0.7/SDRplay_RSP_API-Linux-3.07.1.run \ && chmod 644 /usr/local/lib/libsdrplay_api.so /usr/local/lib/libsdrplay_api.so.3.07 \ && ldconfig +# install UHD API +RUN git clone -b v4.6.0.0 --depth 1 https://github.com/EttusResearch/uhd /opt/uhd \ + && mkdir -p /opt/uhd/host/build && cd /opt/uhd/host/build \ + && cmake -DCMAKE_INSTALL_PREFIX=/opt/uhd -DENABLE_PYTHON_API=OFF \ + -DENABLE_EXAMPLES=OFF -DENABLE_TESTS=OFF -DENABLE_USRP1=OFF \ + -DENABLE_USRP2=OFF -DENABLE_OCTOCLOCK=OFF \ + -DENABLE_MANUAL=OFF -DENABLE_DOXYGEN=OFF -DENABLE_MAN_PAGES=OFF \ + -DENABLE_DPDK=OFF ../ && make && make install && ldconfig + FROM blah2_env as blah2 LABEL maintainer="30hours " diff --git a/docker-compose.yml b/docker-compose.yml index f1fc340..c4cd058 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,6 +18,8 @@ services: - ./config:/blah2/config - /opt/blah2/save:/blah2/save - /dev/shm:/dev/shm + - /dev/usb:/dev/usb + - /proc:/proc network_mode: host privileged: true command: >