161 | | Baseline UHD has UHD images downloaded, and uhd3.14 installed from source. |
| 161 | Baseline UHD starts from Baseline, then installs UHD3.15 installed from source, and downloads the fpga images with uhd_images_downloader |
| 162 | [[CollapsibleStart(Reference Dockerfile)]] |
| 163 | {{{#!dockerfile |
| 164 | FROM container_bare:latest as baseline |
| 165 | ENV DEBIAN_FRONTEND=noninteractive \ |
| 166 | TERM=linux |
| 167 | |
| 168 | RUN apt update && apt -y install \ |
| 169 | ruby ruby-dev iw \ |
| 170 | cmake \ |
| 171 | debhelper \ |
| 172 | doxygen \ |
| 173 | dpdk-dev \ |
| 174 | libboost-date-time-dev \ |
| 175 | libboost-dev \ |
| 176 | libboost-filesystem-dev \ |
| 177 | libboost-program-options-dev \ |
| 178 | libboost-regex-dev \ |
| 179 | libboost-serialization-dev \ |
| 180 | libboost-system-dev \ |
| 181 | libboost-test-dev \ |
| 182 | libboost-thread-dev \ |
| 183 | libncurses5-dev \ |
| 184 | libusb-1.0-0-dev \ |
| 185 | pkg-config \ |
| 186 | python3-apt \ |
| 187 | python3-pip \ |
| 188 | python3-dev \ |
| 189 | python3-mako \ |
| 190 | python3-numpy \ |
| 191 | python3-requests |
| 192 | |
| 193 | #install UHD |
| 194 | ARG UHD_VERSION=3.15.0 |
| 195 | ARG UHD_PATCH=$UHD_VERSION.0 |
| 196 | ARG UHD_TAG=v$UHD_PATCH |
| 197 | WORKDIR /opt/ |
| 198 | RUN git clone https://github.com/EttusResearch/uhd -b $UHD_TAG --single-branch |
| 199 | RUN cd uhd/host && mkdir build && cd build && \ |
| 200 | cmake .. && make -j`nproc` |
| 201 | RUN cd uhd/host/build && make test |
| 202 | RUN cd /opt/uhd/host/build && make install |
| 203 | |
| 204 | #clean up build dir |
| 205 | RUN rm -rf /opt/uhd |
| 206 | |
| 207 | #trick apt into thinking uhd was installed from repo |
| 208 | RUN apt update && apt install -y \ |
| 209 | equivs |
| 210 | RUN equivs-control libuhd-dev.control && \ |
| 211 | sed -i "s/<package name; defaults to equivs-dummy>/libuhd-dev/g" libuhd-dev.control && \ |
| 212 | sed -i "s/# Version: <enter version here; defaults to 1.0>/Version: $UHD_PATCH/g" libuhd-dev.control && \ |
| 213 | equivs-build libuhd-dev.control && \ |
| 214 | dpkg -i libuhd-dev*.deb |
| 215 | RUN equivs-control libuhd$UHD_VERSION.control && \ |
| 216 | sed -i "s/<package name; defaults to equivs-dummy>/libuhd$UHD_VERSION/g" libuhd$UHD_VERSION.control && \ |
| 217 | sed -i "s/# Version: <enter version here; defaults to 1.0>/Version: $UHD_PATCH/g" libuhd$UHD_VERSION.control && \ |
| 218 | equivs-build libuhd$UHD_VERSION.control && \ |
| 219 | dpkg -i libuhd$UHD_VERSION*.deb |
| 220 | RUN rm -f /opt/*.control && rm -f /opt/*.deb |
| 221 | |
| 222 | #enable libraries and download images |
| 223 | RUN ldconfig |
| 224 | RUN uhd_images_downloader |
| 225 | |
| 226 | #install usrp PCIe drivers |
| 227 | WORKDIR /opt/ |
| 228 | ADD files/usrp/niusrprio-installer-18.0.0.tar.gz /opt/ |
| 229 | #tell it how to log, set kernel target to latest installed |
| 230 | #handle exit 2 for some reason.. |
| 231 | RUN cp ./niusrprio_installer/niusrprio_pcie /usr/local/bin/ && \ |
| 232 | KERNELTARGET=$(ls -tr /lib/modules | tail -1) \ |
| 233 | LOG_MSD_STDERR=true \ |
| 234 | /opt/niusrprio_installer/INSTALL --accept-license --no-prompt; \ |
| 235 | if [ "$?" -eq 2 ]; then exit 0; fi |
| 236 | #install unit file and udev rule |
| 237 | COPY files/usrp/niusrprio.service /etc/systemd/system/ |
| 238 | COPY files/usrp/99-usrprio.rules /etc/udev/rules.d/ |
| 239 | |
| 240 | #add UHD related sysctls to system |
| 241 | RUN echo "net.core.rmem_max=33554432" >> /etc/sysctl.conf && \ |
| 242 | echo "net.core.wmem_max=33554432" >> /etc/sysctl.conf |
| 243 | |
| 244 | #Install OMF6 RC |
| 245 | |
| 246 | #fix dependencies |
| 247 | RUN gem install hashie:'~>2' facter:'~>2' omf_rc:'6.2.3' |
| 248 | #manually patch omf_rc |
| 249 | COPY files/omf/config.yml /var/lib/gems/2.5.0/gems/omf_rc-6.2.3/config/config.yml |
| 250 | COPY files/omf/environment /var/lib/gems/2.5.0/gems/omf_rc-6.2.3/init/ |
| 251 | COPY files/omf/omf_rc.service /var/lib/gems/2.5.0/gems/omf_rc-6.2.3/init/ |
| 252 | COPY files/omf/install_omf_rc /usr/local/bin/install_omf_rc |
| 253 | RUN install_omf_rc -i -c |
| 254 | |
| 255 | #copy misc files needed |
| 256 | COPY files/blacklist/* /etc/modprobe.d/ |
| 257 | COPY files/prepare.sh /root/prepare.sh |
| 258 | |
| 259 | #clean up build |
| 260 | RUN rm -f /etc/apt/apt.conf.d/01proxy && \ |
| 261 | rm -rf /var/lib/apt/lists/* && \ |
| 262 | apt clean && \ |
| 263 | apt autoclean |
| 264 | }}} |
| 265 | |
| 266 | [[CollapsibleEnd]] |