Changes between Version 13 and Version 14 of User Guide/Disk Images


Ignore:
Timestamp:
May 10, 2020, 11:47:41 PM (4 years ago)
Author:
msherman
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • User Guide/Disk Images

    v13 v14  
    5757}}}
    5858
    59 ==== Baseline Image
     59==== Bare
     60
     61This is a customized image, build off of Ubuntu Server 18.04
     62
     63[[CollapsibleStart]]
     64{{{#!dockerfile
     65FROM scratch as bare
     66ADD src/18.04-server-cloudimg-amd64-root.tar.xz            /
     67#docker optimizations for apt
     68RUN set -xe \
     69    \
     70# https://github.com/docker/docker/blob/9a9fc01af8fb5d98b8eec0740716226fadb3735c/contrib/mkimage/debootstrap#L85-L105
     71        && echo 'DPkg::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true"; };' > /etc/apt/apt.conf.d/docker-clean \
     72        && echo 'APT::Update::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true"; };' >> /etc/apt/apt.conf.d/docker-clean \
     73        && echo 'Dir::Cache::pkgcache ""; Dir::Cache::srcpkgcache "";' >> /etc/apt/apt.conf.d/docker-clean \
     74        \
     75# https://github.com/docker/docker/blob/9a9fc01af8fb5d98b8eec0740716226fadb3735c/contrib/mkimage/debootstrap#L109-L115
     76        && echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/docker-no-languages \
     77        \
     78# https://github.com/docker/docker/blob/9a9fc01af8fb5d98b8eec0740716226fadb3735c/contrib/mkimage/debootstrap#L118-L130
     79        && echo 'Acquire::GzipIndexes "true"; Acquire::CompressionTypes::Order:: "gz";' > /etc/apt/apt.conf.d/docker-gzip-indexes \
     80        \
     81# https://github.com/docker/docker/blob/9a9fc01af8fb5d98b8eec0740716226fadb3735c/contrib/mkimage/debootstrap#L134-L151
     82        && echo 'Apt::AutoRemove::SuggestsImportant "false";' > /etc/apt/apt.conf.d/docker-autoremove-suggests
     83
     84ARG KERNEL_TYPE="generic"
     85ARG COMMON_PKGS="vim emacs git dnsutils"
     86
     87ENV DEBIAN_FRONTEND=noninteractive \
     88    TERM=linux
     89#set up apt sources
     90COPY files/apt/ /etc/apt/
     91RUN wget -qO - https://www.mellanox.com/downloads/ofed/RPM-GPG-KEY-Mellanox | apt-key add -
     92#install bootloader and kernel, common packages
     93RUN apt update && apt install --no-install-recommends -fy \
     94    linux-image-${KERNEL_TYPE} \
     95    linux-headers-${KERNEL_TYPE} \
     96    grub-pc \
     97    software-properties-common \
     98    build-essential \
     99    ssh \
     100    ${COMMON_PKGS}
     101   
     102#disable auto updates
     103RUN apt -fy purge unattended-upgrades
     104
     105#create users with "blank" passwords. WARNING, very insecure!!!
     106RUN echo "root:root" | chpasswd && \
     107    sed -i 's/^\(root:\)[^:]*\(:.*\)$/\1\2/' /etc/shadow && \
     108    cp -r /etc/skel/. /root/
     109
     110COPY files/fstab /etc/fstab
     111COPY files/grub /etc/default/grub
     112RUN rm /etc/default/grub.d/*
     113COPY files/00-netplan.yaml /etc/netplan/00-netplan.yaml
     114COPY files/ssh/server/* /etc/ssh/
     115COPY files/ssh/client/* /root/.ssh/
     116
     117#fix ssh key permissions
     118RUN chmod 400 /etc/ssh/ssh_host_*_key && chmod 444 /etc/ssh/ssh_host_*_key.pub
     119
     120#16.04 and prior use ifupdown
     121#COPY dhcp/hostname-ifupdown /etc/dhcp/dhclient-exit-hooks.d/hostname
     122#18.04 uses netplan and networkd-dispatcher
     123COPY files/dhcp/hostname-networkd /etc/networkd-dispatcher/routable.d/20-hostname.sh
     124RUN chmod +x /etc/networkd-dispatcher/routable.d/20-hostname.sh
     125
     126#clean up build
     127RUN rm -f /etc/apt/apt.conf.d/01proxy && \
     128    rm -rf /var/lib/apt/lists/* && \
     129    apt clean && \
     130    apt autoclean
     131
     132#commands are rune when container is started
     133#workaround for "locked" files in docker-build
     134#this may delay image saving
     135COPY files/late_commands.sh /root/late_commands.sh
     136ENTRYPOINT ["/root/late_commands.sh"]
     137CMD ["/bin/bash"]
     138}}}
     139
     140
     141[[CollapsibleEnd]]
     142
     143==== Baseline
    60144
    61145The baseline image is a very bare install of Ubuntu 18.04 Bionic
     
    70154Baseline UHD has UHD images downloaded, and uhd3.14 installed from source.
    71155
    72 ==== Baseline SDR
     156==== Baseline GR
    73157
    74158==== Baseline CUDA
     
    861704. You will also have to add the directory of cuda binaries to the path. Edit the .profile file and add 'PATH="PATH:/usr/local/cuda/bin"'
    87171
    88 === Building a baseline image
     172==== Baseline Tensorflow
     173
     174==== Baseline Pytorch
     175
     176=== Advanced
     177
     178==== Building a baseline image
    891791. Use pxe or usb to install ubuntu netinstall iso
    901801. Start it up, run update and dist-upgrade