Add UHD to Dockerfile

This commit is contained in:
30hours 2024-01-12 05:36:02 +00:00
parent ef0b77a532
commit ca3aee9877
2 changed files with 15 additions and 0 deletions

View file

@ -6,6 +6,10 @@ ADD lib lib
RUN apt-get update \ RUN apt-get update \
&& apt-get install -y g++ make cmake git curl zip unzip doxygen graphviz \ && apt-get install -y g++ make cmake git curl zip unzip doxygen graphviz \
libfftw3-dev pkg-config gfortran \ 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 autoremove -y \
&& apt-get clean -y \ && apt-get clean -y \
&& rm -rf /var/lib/apt/lists/* && 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 \ && chmod 644 /usr/local/lib/libsdrplay_api.so /usr/local/lib/libsdrplay_api.so.3.07 \
&& ldconfig && 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 FROM blah2_env as blah2
LABEL maintainer="30hours <nathan@30hours.dev>" LABEL maintainer="30hours <nathan@30hours.dev>"

View file

@ -18,6 +18,8 @@ services:
- ./config:/blah2/config - ./config:/blah2/config
- /opt/blah2/save:/blah2/save - /opt/blah2/save:/blah2/save
- /dev/shm:/dev/shm - /dev/shm:/dev/shm
- /dev/usb:/dev/usb
- /proc:/proc
network_mode: host network_mode: host
privileged: true privileged: true
command: > command: >