Skip to content

Instantly share code, notes, and snippets.

@stefancrain
Last active November 12, 2020 17:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefancrain/acd066ccca851fe6bccd788bb90d8e8d to your computer and use it in GitHub Desktop.
Save stefancrain/acd066ccca851fe6bccd788bb90d8e8d to your computer and use it in GitHub Desktop.
gnuradio
FROM python:buster
RUN apt-get update \
&& apt-get install -y \
cmake \
doxygen \
gir1.2-gtk-3.0 \
gobject-introspection \
libboost-all-dev \
libfftw3-dev \
libgsl-dev \
libi2c-dev \
liblog4cpp5-dev \
libqt5opengl5-dev \
libqt5svg5-dev \
libqwt-qt5-dev \
libsdl1.2-dev \
libusb-1.0-0-dev \
libzmq3-dev \
python3-click \
python3-click-plugins \
python3-gi \
python3-gi-cairo \
python3-lxml \
python3-mako \
python3-numpy \
python3-pybind11 \
python3-pyqt5 \
python3-scipy \
python3-sphinx \
python3-yaml \
python3-zmq \
qtbase5-dev \
swig \
&& rm -rf /var/lib/apt/lists/*
RUN pip install mako
WORKDIR /opt/sdr-src
RUN git clone --recursive https://github.com/pothosware/SoapySDR.git \
&& cd SoapySDR \
&& mkdir build \
&& cd build \
&& cmake ../ \
&& make -j$(nproc) \
&& make install \
&& ldconfig
RUN git clone --recursive https://github.com/gnuradio/volk.git \
&& cd volk \
&& mkdir build \
&& cd build \
&& cmake -DCMAKE_BUILD_TYPE=Release ../ \
&& make -j$(nproc) \
&& make install \
&& ldconfig
RUN git clone https://github.com/gnuradio/gnuradio.git \
&& cd gnuradio \
&& git checkout v3.8.2.0 \
&& mkdir build \
&& cd build \
&& cmake -DENABLE_INTERNAL_VOLK=OFF -DCMAKE_BUILD_TYPE=Release ../ \
&& make -j$(nproc) \
&& make install \
&& ldconfig
RUN git clone https://github.com/osmocom/rtl-sdr.git \
&& cd rtl-sdr \
&& mkdir build \
&& cd build \
&& cmake ../ \
&& make -j$(nproc) \
&& make install \
&& ldconfig
RUN git clone https://github.com/osmocom/gr-osmosdr \
&& cd gr-osmosdr \
&& mkdir build \
&& cd build \
&& cmake -DCMAKE_BUILD_TYPE=Release ../ \
&& make -j$(nproc) \
&& make install \
&& ldconfig
RUN git clone https://github.com/csete/gqrx.git \
&& cd gqrx \
&& mkdir build \
&& cd build \
&& cmake -DCMAKE_BUILD_TYPE=Release ../ \
&& make -j$(nproc) \
&& make install \
&& ldconfig
WORKDIR /root
ENTRYPOINT [ "/bin/bash" ]
#!/bin/bash
IP=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}')
# hack but works
xhost + "${IP}"
sudo docker run \
-it --rm --privileged \
-u root \
-e PULSE_SERVER=docker.for.mac.localhost \
-e DISPLAY=$IP:0 \
-v /dev/bus/usb:/dev/bus/usb \
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
-v /Users/scrain/.config/pulse/:/root/.config/pulse/ \
-v /Users/scrain/Radio/Docker/mnt/:/root/ \
radio:latest "$@"
# docker run --rm -it --device /dev/ttyUSB0 ubuntu:18.04 bash -c "ls /dev/ttyUSB0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment