From e8964dc40d221690810ebb5c63afd55f1e65a745 Mon Sep 17 00:00:00 2001 From: vladd-bit Date: Wed, 18 Dec 2024 00:34:47 +0000 Subject: [PATCH] Updated dockerfiles. --- Dockerfile_singleuser | 98 ++++++++++++++++++++++----------------- Dockerfile_singleuser_gpu | 78 +++++++++++++++++-------------- 2 files changed, 98 insertions(+), 78 deletions(-) diff --git a/Dockerfile_singleuser b/Dockerfile_singleuser index 8944689..1923543 100644 --- a/Dockerfile_singleuser +++ b/Dockerfile_singleuser @@ -30,49 +30,15 @@ RUN apt-add-repository multiverse && \ apt-add-repository universe && \ add-apt-repository ppa:graphics-drivers/ppa && \ add-apt-repository ppa:deadsnakes/ppa && \ - apt-get update && apt-get upgrade -y - -# run updates -RUN apt-get update && apt-get upgrade -y && dpkg --configure -a && \ -apt-get --force-yes -o Dpkg::Options::="--force-confold" --force-yes -o Dpkg::Options::="--force-confdef" -fuy full-upgrade && \ -apt-get autoremove -y && \ -apt-get clean -y && \ -apt-get install -y \ -gnupg \ -ssl-cert \ -libevent-dev \ -libsqlite3-dev \ -libxml2-dev \ -libbz2-dev \ -libxslt1-dev \ -zlib1g-dev \ -libssl-dev \ -wget \ -curl \ -gnupg-agent \ -dirmngr \ -ca-certificates \ -apt-transport-https \ -apt-utils \ -fonts-dejavu \ -nano \ -iputils-ping \ -cmake \ -make \ -build-essential \ -unixodbc \ -unixodbc-dev \ -r-cran-rodbc \ -gfortran \ -gcc \ -g++ \ -git \ -ssh \ -jq \ -htop \ -libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 \ -libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6 \ -r-base + apt-get update && apt-get upgrade -y && \ + apt-get --force-yes -o Dpkg::Options::="--force-confold" --force-yes -o Dpkg::Options::="--force-confdef" -fuy full-upgrade && \ + apt-get autoremove -y && \ + apt-get clean -y && \ + apt-get install -y \ + wget \ + curl \ + ca-certificates \ + apt-transport-https # Microsoft repos RUN wget -q -O- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/packages.microsoft.gpg @@ -105,6 +71,52 @@ RUN if [ "${CPU_ARCHITECTURE}" = "amd64" ]; then \ echo "No valid CPU_ARCHITECTURE specified"; \ fi +# python 3.11 repo +RUN apt-get update -y && apt-get upgrade -y + +# run updates +RUN apt-get update && apt-get upgrade -y && dpkg --configure -a && \ + apt-get --force-yes -o Dpkg::Options::="--force-confold" --force-yes -o Dpkg::Options::="--force-confdef" -fuy full-upgrade && \ + apt-get autoremove -y && \ + apt-get clean -y && \ + apt-get install -y \ + gnupg \ + ssl-cert \ + libevent-dev \ + libsqlite3-dev \ + libxml2-dev \ + libbz2-dev \ + libxslt1-dev \ + zlib1g-dev \ + libssl-dev \ + wget \ + curl \ + gnupg-agent \ + dirmngr \ + ca-certificates \ + apt-transport-https \ + apt-utils \ + fonts-dejavu \ + nano \ + iputils-ping \ + cmake \ + make \ + build-essential \ + unixodbc \ + unixodbc-dev \ + r-cran-rodbc \ + gfortran \ + gcc \ + g++ \ + git \ + ssh \ + jq \ + htop \ + libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 \ + libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6 \ + r-base + + # remove newer python version, freeze other versions for max compatibility before updates RUN apt --fix-missing purge $(dpkg -l | grep 'python3\.1[01]' | awk '{print $2}') RUN apt --fix-broken install diff --git a/Dockerfile_singleuser_gpu b/Dockerfile_singleuser_gpu index 5bac67e..fb43ff0 100644 --- a/Dockerfile_singleuser_gpu +++ b/Dockerfile_singleuser_gpu @@ -36,7 +36,49 @@ RUN apt-add-repository multiverse && \ apt-add-repository universe && \ add-apt-repository ppa:graphics-drivers/ppa && \ add-apt-repository ppa:deadsnakes/ppa && \ - apt-get update && apt-get upgrade -y + apt-get update && apt-get upgrade -y && \ + apt-get --force-yes -o Dpkg::Options::="--force-confold" --force-yes -o Dpkg::Options::="--force-confdef" -fuy full-upgrade && \ + apt-get autoremove -y && \ + apt-get clean -y && \ + apt-get install -y \ + wget \ + curl \ + ca-certificates \ + apt-transport-https + +# Microsoft repos +RUN wget -q -O- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/packages.microsoft.gpg +RUN curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list >> /etc/apt/sources.list.d/mssql-release.list +RUN echo "deb [arch=arm64] https://packages.microsoft.com/ubuntu/22.04/prod jammy main" | tee -a /etc/apt/sources.list + +# Add latest ubuntu repos to sources.list +# add arch +RUN if [ "${CPU_ARCHITECTURE}" = "amd64" ]; then \ + echo "deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \ + echo "deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \ + echo "deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \ + echo "deb-src http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \ + echo "deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \ + echo "deb-src http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \ + echo "deb http://archive.canonical.com/ubuntu/ jammy partner" | tee -a /etc/apt/sources.list ; \ + echo "deb-src http://archive.canonical.com/ubuntu/ jammy partner" | tee -a /etc/apt/sources.list ; \ + elif [ "${CPU_ARCHITECTURE}" = "arm64" ]; then \ + echo "deb [arch=arm64] http://archive.canonical.com/ubuntu/ jammy partner" | tee -a /etc/apt/sources.list ; \ + echo "deb-src [arch=arm64] http://archive.canonical.com/ubuntu/ jammy partner" | tee -a /etc/apt/sources.list ; \ + echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \ + echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \ + echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-backports main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \ + echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \ + echo "deb-src [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \ + echo "deb-src [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \ + echo "deb-src [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-backports main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \ + echo "deb-src [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \ + else \ + echo "No valid CPU_ARCHITECTURE specified"; \ + fi + +# python 3.11 repo +RUN apt-get update -y && apt-get upgrade -y # run updates RUN apt-get update && apt-get upgrade -y && dpkg --configure -a && \ @@ -53,12 +95,8 @@ RUN apt-get update && apt-get upgrade -y && dpkg --configure -a && \ libxslt1-dev \ zlib1g-dev \ libssl-dev \ - wget \ - curl \ gnupg-agent \ dirmngr \ - ca-certificates \ - apt-transport-https \ apt-utils \ fonts-dejavu \ nano \ @@ -80,36 +118,6 @@ RUN apt-get update && apt-get upgrade -y && dpkg --configure -a && \ libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6 \ r-base -# Microsoft repos -RUN wget -q -O- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/packages.microsoft.gpg -RUN curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list >> /etc/apt/sources.list.d/mssql-release.list -RUN echo "deb [arch=arm64] https://packages.microsoft.com/ubuntu/22.04/prod jammy main" | tee -a /etc/apt/sources.list - -# Add latest ubuntu repos to sources.list -# add arch -RUN if [ "${CPU_ARCHITECTURE}" = "amd64" ]; then \ - echo "deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \ - echo "deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \ - echo "deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \ - echo "deb-src http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \ - echo "deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \ - echo "deb-src http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \ - echo "deb http://archive.canonical.com/ubuntu/ jammy partner" | tee -a /etc/apt/sources.list ; \ - echo "deb-src http://archive.canonical.com/ubuntu/ jammy partner" | tee -a /etc/apt/sources.list ; \ - elif [ "${CPU_ARCHITECTURE}" = "arm64" ]; then \ - echo "deb [arch=arm64] http://archive.canonical.com/ubuntu/ jammy partner" | tee -a /etc/apt/sources.list ; \ - echo "deb-src [arch=arm64] http://archive.canonical.com/ubuntu/ jammy partner" | tee -a /etc/apt/sources.list ; \ - echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \ - echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \ - echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-backports main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \ - echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \ - echo "deb-src [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \ - echo "deb-src [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \ - echo "deb-src [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-backports main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \ - echo "deb-src [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \ - else \ - echo "No valid CPU_ARCHITECTURE specified"; \ - fi # remove newer python version, freeze other versions for max compatibility before updates RUN apt --fix-missing purge $(dpkg -l | grep 'python3\.1[01]' | awk '{print $2}')