-
Notifications
You must be signed in to change notification settings - Fork 11
/
Dockerfile
102 lines (84 loc) · 2.63 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
FROM ubuntu:16.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt upgrade -yf \
&& apt install -y software-properties-common\
&& add-apt-repository -y ppa:myriadrf/gnuradio \
&& add-apt-repository -y ppa:myriadrf/drivers \
&& apt-get update \
&& apt install -y bison \
build-essential \
cmake \
doxygen \
flex cmake libaio-dev \
git \
graphviz \
libasound2-dev \
libavahi-client-dev \
libboost-all-dev \
libboost-all-dev swig \
libcdk5-dev \
libfftw3-3 \
libfftw3-dev \
libgsl-dev \
liblog4cpp5-dev \
libqwt5-qt4 \
libqwt-dev \
libserialport-dev \
libusb-1.0-0 \
libusb-1.0-0-dev \
libusb-1.0-0-dev \
libxml2 \
libxml2-dev \
libzmq3-dev \
pkg-config \
python-cairo-dev \
python-cheetah \
python-dev \
python-gtk2 \
python-lxml \
python-mako \
python-numpy \
python-qt4 \
python-qwt5-qt4 \
python-zmq \
swig \
&& apt install -y gnuradio gnuradio-dev xterm git libvolk1-bin --no-install-recommends \
&& echo "xterm_executable=/usr/bin/xterm" >> /etc/gnuradio/conf.d/grc.conf
WORKDIR /opt
RUN git clone https://github.com/analogdevicesinc/libiio.git \
&& cd libiio \
&& cmake ./ \
&& make all \
&& make install \
&& cd ..
RUN git clone https://github.com/analogdevicesinc/libad9361-iio.git \
&& cd libad9361-iio \
&& cmake ./ \
&& make && make install \
&& cd ..
RUN git clone https://github.com/analogdevicesinc/gr-iio.git \
&& cd gr-iio \
&& cmake -DCMAKE_INSTALL_PREFIX=/usr . \
&& make && make install \
&& cd .. \
&& ldconfig
RUN apt install -y pulseaudio-utils pulseaudio --no-install-recommends
COPY pulse-client.conf /etc/pulse/client.conf
RUN sed -i "s/enable-shm = yes/enable-shm = no/" /etc/pulse/daemon.conf
RUN apt-get -y clean && apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/*
ENV UNAME gnuradio
RUN export UNAME=$UNAME UID=1000 GID=1000 \
&& mkdir -p "/home/${UNAME}" \
&& echo "${UNAME}:x:${UID}:${GID}:${UNAME} User,,,:/home/${UNAME}:/bin/bash" >> /etc/passwd \
&& echo "${UNAME}:x:${UID}:" >> /etc/group \
&& mkdir -p /etc/sudoers.d \
&& echo "${UNAME} ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/${UNAME} \
&& chmod 0440 /etc/sudoers.d/${UNAME} \
&& chown ${UID}:${GID} -R /home/${UNAME} \
&& usermod -a -G audio,root ${UNAME}
USER $UNAME
ENV HOME /home/${UNAME}
WORKDIR $HOME
RUN volk_profile
ENTRYPOINT [ "gnuradio-companion" ]