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 7d8d2e0 commit 51265b5
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 27 deletions.
19 changes: 9 additions & 10 deletions Dockerfile_singleuser
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,14 @@ RUN apt-get update && apt-get upgrade -y && \
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

# 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 \
Expand All @@ -57,6 +63,9 @@ 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 && \
Expand Down Expand Up @@ -105,23 +114,13 @@ RUN apt --fix-missing purge $(dpkg -l | grep 'python3\.1[01]' | awk '{print $2}'
RUN apt --fix-broken install
RUN apt-get purge --auto-remove python3.10

# python 3.11 repo
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt-get update -y && apt-get upgrade -y

# python 3.11
RUN apt-get install -y python3.11-full python3.11-dev python3-pip python3-venv

# be careful, this conflicts
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1

RUN apt-get update && apt-get upgrade -y

# 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

# install remaining packages
RUN apt-get update && apt-get upgrade -y
RUN apt-get -y --no-install-recommends install unixodbc unixodbc-dev odbcinst
Expand Down
34 changes: 17 additions & 17 deletions Dockerfile_singleuser_gpu
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,25 @@ RUN apt-get update && apt-get upgrade -y && \
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

# Add latest ubuntu repos to sources.list
# 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 ; \
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 ; \
Expand All @@ -63,6 +69,9 @@ 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 && \
Expand Down Expand Up @@ -111,10 +120,6 @@ RUN apt --fix-missing purge $(dpkg -l | grep 'python3\.1[01]' | awk '{print $2}'
RUN apt --fix-broken install
RUN apt-get purge --auto-remove python3.10

# python 3.11 repo
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt-get update -y && apt-get upgrade -y

# python 3.11
RUN apt-get install -y python3.11-full python3.11-dev python3-pip python3-venv

Expand Down Expand Up @@ -150,11 +155,6 @@ RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y nvidia-docker2 nvidia-container-toolkit
################################################################################################################################################################

# Microsoft repos
RUN curl -fsSL 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

# install remaining packages
RUN apt-get update && apt-get upgrade -y
RUN apt-get -y --no-install-recommends install unixodbc unixodbc-dev odbcinst
Expand Down

0 comments on commit 51265b5

Please sign in to comment.