-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile.doa
139 lines (129 loc) · 3.62 KB
/
Dockerfile.doa
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
FROM quay.io/centos/centos:stream9
ARG TERM=xterm
ARG CENTOS_FRONTEND=noninteractive
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
RUN dnf -y update --refresh
RUN dnf -y install dnf-plugins-core
RUN dnf -y config-manager --set-enabled crb
RUN dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
RUN dnf -y install git \
cmake \
libusb1-devel \
lsof \
gcc \
gcc-c++ \
cpp \
clang \
flex \
bison \
binutils \
sudo \
libstdc++-devel \
libstdc++-static \
glibc-devel \
glibc-static \
procps-ng \
util-linux-core \
zeromq-devel \
mold \
ninja-build \
nodejs \
php-cli \
usbutils \
jq
# miniserve instead of PHP
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
RUN /root/.cargo/bin/cargo install miniserve
# Hacked rtl-sdr drivers
WORKDIR /tmp/
RUN git clone https://github.com/krakenrf/librtlsdr
RUN mkdir -p librtlsdr/build
WORKDIR /tmp/librtlsdr/build
RUN cmake ../ -DINSTALL_UDEV_RULES=ON -DCMAKE_INSTALL_PREFIX=/usr
RUN make
RUN make install
RUN cp ../rtl-sdr.rules /etc/udev/rules.d/
RUN ldconfig
RUN rm -fR /tmp/librtlsdr
# KFR DSP library
WORKDIR /tmp
RUN git clone https://github.com/kfrlib/kfr.git --branch 6.0.2 --single-branch
RUN mkdir -p krf/build
WORKDIR /tmp/kfr/build
RUN cmake -Wno-dev -GNinja -DKFR_ENABLE_CAPI_BUILD=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=ON ..
RUN ninja
RUN mkdir /usr/include/kfr
RUN cp /tmp/kfr/build/lib/* /usr/lib
RUN cp /tmp/kfr/include/kfr/capi.h /usr/include/kfr
RUN ldconfig
RUN rm -fR /tmp/kfr
WORKDIR /tmp
RUN curl --proto '=https' --tlsv1.2 -sSfLO https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh
RUN chmod ug+x /tmp/Miniforge3-Linux-x86_64.sh
RUN /tmp/Miniforge3-Linux-x86_64.sh -b -p /root/miniconda
RUN eval "$(/root/miniconda/bin/conda shell.bash hook)"
ENV PATH="/root/miniconda/bin:${PATH}"
RUN conda config --set auto_activate_base false
WORKDIR /root/
RUN conda update --all
RUN conda init bash
RUN conda create -n kraken python=3.11
RUN conda run -n kraken conda install intel-cmplr-lib-rt
RUN conda run -n kraken conda install numba \
pyzmq \
pandas \
tbb4py \
numpy \
orjson \
scipy==1.9.3
RUN conda run -n kraken conda install "libblas=*=*mkl"
RUN rm -fR /tmp/Miniforge3-Linux-x86_64.sh
# HeIMDALL DAQ Firmware
RUN mkdir /root/krakensdr
WORKDIR /root/krakensdr
RUN git clone https://github.com/krakenrf/heimdall_daq_fw
WORKDIR /root/krakensdr/heimdall_daq_fw/Firmware/_daq_core
RUN conda run -n kraken make
# DoA App
WORKDIR /root/krakensdr
RUN conda run -n kraken conda install quart \
werkzeug==2.0.3 \
requests
RUN conda run -n kraken pip3 install \
quart_compress \
dash_devices \
scikit-rf \
matplotlib \
pyargus \
gitpython \
gpsd-py3
RUN conda run -n kraken conda install \
dash-bootstrap-components \
dash-core-components==1.16.0 \
dash-html-components==1.1.4 \
dash-renderer \
future
RUN git clone https://github.com/krakenrf/krakensdr_doa
RUN cp krakensdr_doa/util/kraken_doa_start.sh .
RUN cp krakensdr_doa/util/kraken_doa_stop.sh .
# Housekeeping
RUN conda run conda clean --all --yes
RUN conda run -n kraken pip3 cache purge
RUN dnf -y remove gcc \
gcc-c++ \
clang \
cmake \
dnf-plugins-core \
cpp \
libstdc++-devel \
glibc-devel \
glibc-static \
libstdc++-static \
flex \
bison \
mold \
ninja-build \
binutils
RUN dnf -y clean all
RUN rm -fR /root/.cargo/registry /root/.rustup/
CMD /root/krakensdr/kraken_doa_start.sh && sleep infinity