2023-12-17 04:06:28 +00:00
|
|
|
FROM ubuntu:22.04 as blah2_env
|
2024-01-01 16:58:20 +00:00
|
|
|
LABEL maintainer="30hours <nathan@30hours.dev>"
|
2023-05-04 11:25:37 +00:00
|
|
|
|
2024-01-01 16:58:20 +00:00
|
|
|
WORKDIR /blah2
|
2023-05-04 11:25:37 +00:00
|
|
|
ADD lib lib
|
2024-01-01 16:58:20 +00:00
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -y g++ make cmake git curl zip unzip doxygen graphviz \
|
2024-01-02 02:52:58 +00:00
|
|
|
libfftw3-dev pkg-config gfortran \
|
2024-01-12 05:36:02 +00:00
|
|
|
# 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 \
|
2024-01-02 02:52:58 +00:00
|
|
|
&& apt-get autoremove -y \
|
|
|
|
&& apt-get clean -y \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2023-10-25 13:18:03 +00:00
|
|
|
|
2024-01-01 16:58:20 +00:00
|
|
|
# install dependencies from vcpkg
|
|
|
|
RUN git clone https://github.com/microsoft/vcpkg /opt/vcpkg \
|
|
|
|
&& /opt/vcpkg/bootstrap-vcpkg.sh
|
|
|
|
ENV PATH="/opt/vcpkg:${PATH}" VCPKG_ROOT=/opt/vcpkg
|
|
|
|
RUN cd /blah2/lib && vcpkg integrate install \
|
|
|
|
&& vcpkg install --clean-after-build
|
|
|
|
|
|
|
|
# install SDRplay API
|
2023-10-25 13:18:03 +00:00
|
|
|
RUN chmod +x /blah2/lib/sdrplay-3.0.7/SDRplay_RSP_API-Linux-3.07.1.run \
|
|
|
|
&& /blah2/lib/sdrplay-3.0.7/SDRplay_RSP_API-Linux-3.07.1.run --tar -xvf -C /blah2/lib/sdrplay-3.0.7 \
|
|
|
|
&& cp /blah2/lib/sdrplay-3.0.7/x86_64/libsdrplay_api.so.3.07 /usr/local/lib/libsdrplay_api.so \
|
|
|
|
&& cp /blah2/lib/sdrplay-3.0.7/x86_64/libsdrplay_api.so.3.07 /usr/local/lib/libsdrplay_api.so.3.07 \
|
|
|
|
&& cp /blah2/lib/sdrplay-3.0.7/inc/* /usr/local/include \
|
|
|
|
&& chmod 644 /usr/local/lib/libsdrplay_api.so /usr/local/lib/libsdrplay_api.so.3.07 \
|
|
|
|
&& ldconfig
|
2023-05-04 11:25:37 +00:00
|
|
|
|
2024-01-12 05:36:02 +00:00
|
|
|
# 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
|
2024-01-12 07:17:48 +00:00
|
|
|
ENV LD_LIBRARY_PATH=/opt/uhd/lib:$LD_LIBRARY_PATH
|
|
|
|
RUN /opt/uhd/lib/uhd/utils/uhd_images_downloader.py
|
2024-01-12 05:36:02 +00:00
|
|
|
|
2023-05-04 11:25:37 +00:00
|
|
|
FROM blah2_env as blah2
|
2024-01-01 16:58:20 +00:00
|
|
|
LABEL maintainer="30hours <nathan@30hours.dev>"
|
2023-05-04 11:25:37 +00:00
|
|
|
|
2024-01-01 16:58:20 +00:00
|
|
|
ADD src src
|
|
|
|
ADD test test
|
2024-01-02 09:14:30 +00:00
|
|
|
ADD CMakeLists.txt CMakePresets.json Doxyfile /blah2/
|
2024-01-02 02:52:58 +00:00
|
|
|
RUN mkdir -p build && cd build && cmake -S . --preset prod-release \
|
2024-01-01 16:58:20 +00:00
|
|
|
-DCMAKE_PREFIX_PATH=/blah2/lib/vcpkg_installed/x64-linux/share .. \
|
2024-01-02 02:52:58 +00:00
|
|
|
&& cd prod-release && make
|
2023-05-04 11:25:37 +00:00
|
|
|
RUN chmod +x bin/blah2
|