Skip to content

Commit

Permalink
Updated dockerfiles.
Browse files Browse the repository at this point in the history
  • Loading branch information
vladd-bit committed Dec 18, 2024
1 parent 8894cf1 commit e8964dc
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 78 deletions.
98 changes: 55 additions & 43 deletions Dockerfile_singleuser
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
78 changes: 43 additions & 35 deletions Dockerfile_singleuser_gpu
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand All @@ -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 \
Expand All @@ -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}')
Expand Down

0 comments on commit e8964dc

Please sign in to comment.