Skip to content

Commit 8894cf1

Browse files
committed
Updated dockerfiles.
1 parent 51265b5 commit 8894cf1

File tree

2 files changed

+72
-80
lines changed

2 files changed

+72
-80
lines changed

Dockerfile_singleuser

Lines changed: 42 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,48 @@ RUN apt-add-repository multiverse && \
3232
add-apt-repository ppa:deadsnakes/ppa && \
3333
apt-get update && apt-get upgrade -y
3434

35+
# run updates
36+
RUN apt-get update && apt-get upgrade -y && dpkg --configure -a && \
37+
apt-get --force-yes -o Dpkg::Options::="--force-confold" --force-yes -o Dpkg::Options::="--force-confdef" -fuy full-upgrade && \
38+
apt-get autoremove -y && \
39+
apt-get clean -y && \
40+
apt-get install -y \
41+
gnupg \
42+
ssl-cert \
43+
libevent-dev \
44+
libsqlite3-dev \
45+
libxml2-dev \
46+
libbz2-dev \
47+
libxslt1-dev \
48+
zlib1g-dev \
49+
libssl-dev \
50+
wget \
51+
curl \
52+
gnupg-agent \
53+
dirmngr \
54+
ca-certificates \
55+
apt-transport-https \
56+
apt-utils \
57+
fonts-dejavu \
58+
nano \
59+
iputils-ping \
60+
cmake \
61+
make \
62+
build-essential \
63+
unixodbc \
64+
unixodbc-dev \
65+
r-cran-rodbc \
66+
gfortran \
67+
gcc \
68+
g++ \
69+
git \
70+
ssh \
71+
jq \
72+
htop \
73+
libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 \
74+
libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6 \
75+
r-base
76+
3577
# Microsoft repos
3678
RUN wget -q -O- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/packages.microsoft.gpg
3779
RUN curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list >> /etc/apt/sources.list.d/mssql-release.list
@@ -63,52 +105,6 @@ RUN if [ "${CPU_ARCHITECTURE}" = "amd64" ]; then \
63105
echo "No valid CPU_ARCHITECTURE specified"; \
64106
fi
65107

66-
# python 3.11 repo
67-
RUN apt-get update -y && apt-get upgrade -y
68-
69-
# run updates
70-
RUN apt-get update && apt-get upgrade -y && dpkg --configure -a && \
71-
apt-get --force-yes -o Dpkg::Options::="--force-confold" --force-yes -o Dpkg::Options::="--force-confdef" -fuy full-upgrade && \
72-
apt-get autoremove -y && \
73-
apt-get clean -y && \
74-
apt-get install -y \
75-
gnupg \
76-
ssl-cert \
77-
libevent-dev \
78-
libsqlite3-dev \
79-
libxml2-dev \
80-
libbz2-dev \
81-
libxslt1-dev \
82-
zlib1g-dev \
83-
libssl-dev \
84-
wget \
85-
curl \
86-
gnupg-agent \
87-
dirmngr \
88-
ca-certificates \
89-
apt-transport-https \
90-
apt-utils \
91-
fonts-dejavu \
92-
nano \
93-
iputils-ping \
94-
cmake \
95-
make \
96-
build-essential \
97-
unixodbc \
98-
unixodbc-dev \
99-
r-cran-rodbc \
100-
gfortran \
101-
gcc \
102-
g++ \
103-
git \
104-
ssh \
105-
jq \
106-
htop \
107-
libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 \
108-
libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6 \
109-
r-base
110-
111-
112108
# remove newer python version, freeze other versions for max compatibility before updates
113109
RUN apt --fix-missing purge $(dpkg -l | grep 'python3\.1[01]' | awk '{print $2}')
114110
RUN apt --fix-broken install

Dockerfile_singleuser_gpu

Lines changed: 30 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -38,40 +38,6 @@ RUN apt-add-repository multiverse && \
3838
add-apt-repository ppa:deadsnakes/ppa && \
3939
apt-get update && apt-get upgrade -y
4040

41-
# Microsoft repos
42-
RUN wget -q -O- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/packages.microsoft.gpg
43-
RUN curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list >> /etc/apt/sources.list.d/mssql-release.list
44-
RUN echo "deb [arch=arm64] https://packages.microsoft.com/ubuntu/22.04/prod jammy main" | tee -a /etc/apt/sources.list
45-
46-
# Add latest ubuntu repos to sources.list
47-
# add arch
48-
RUN if [ "${CPU_ARCHITECTURE}" = "amd64" ]; then \
49-
echo "deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \
50-
echo "deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \
51-
echo "deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \
52-
echo "deb-src http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \
53-
echo "deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \
54-
echo "deb-src http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \
55-
echo "deb http://archive.canonical.com/ubuntu/ jammy partner" | tee -a /etc/apt/sources.list ; \
56-
echo "deb-src http://archive.canonical.com/ubuntu/ jammy partner" | tee -a /etc/apt/sources.list ; \
57-
elif [ "${CPU_ARCHITECTURE}" = "arm64" ]; then \
58-
echo "deb [arch=arm64] http://archive.canonical.com/ubuntu/ jammy partner" | tee -a /etc/apt/sources.list ; \
59-
echo "deb-src [arch=arm64] http://archive.canonical.com/ubuntu/ jammy partner" | tee -a /etc/apt/sources.list ; \
60-
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \
61-
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \
62-
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-backports main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \
63-
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \
64-
echo "deb-src [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \
65-
echo "deb-src [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \
66-
echo "deb-src [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-backports main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \
67-
echo "deb-src [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \
68-
else \
69-
echo "No valid CPU_ARCHITECTURE specified"; \
70-
fi
71-
72-
# python 3.11 repo
73-
RUN apt-get update -y && apt-get upgrade -y
74-
7541
# run updates
7642
RUN apt-get update && apt-get upgrade -y && dpkg --configure -a && \
7743
apt-get --force-yes -o Dpkg::Options::="--force-confold" --force-yes -o Dpkg::Options::="--force-confdef" -fuy full-upgrade && \
@@ -114,6 +80,36 @@ RUN apt-get update && apt-get upgrade -y && dpkg --configure -a && \
11480
libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6 \
11581
r-base
11682

83+
# Microsoft repos
84+
RUN wget -q -O- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/packages.microsoft.gpg
85+
RUN curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list >> /etc/apt/sources.list.d/mssql-release.list
86+
RUN echo "deb [arch=arm64] https://packages.microsoft.com/ubuntu/22.04/prod jammy main" | tee -a /etc/apt/sources.list
87+
88+
# Add latest ubuntu repos to sources.list
89+
# add arch
90+
RUN if [ "${CPU_ARCHITECTURE}" = "amd64" ]; then \
91+
echo "deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \
92+
echo "deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \
93+
echo "deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \
94+
echo "deb-src http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \
95+
echo "deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \
96+
echo "deb-src http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \
97+
echo "deb http://archive.canonical.com/ubuntu/ jammy partner" | tee -a /etc/apt/sources.list ; \
98+
echo "deb-src http://archive.canonical.com/ubuntu/ jammy partner" | tee -a /etc/apt/sources.list ; \
99+
elif [ "${CPU_ARCHITECTURE}" = "arm64" ]; then \
100+
echo "deb [arch=arm64] http://archive.canonical.com/ubuntu/ jammy partner" | tee -a /etc/apt/sources.list ; \
101+
echo "deb-src [arch=arm64] http://archive.canonical.com/ubuntu/ jammy partner" | tee -a /etc/apt/sources.list ; \
102+
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \
103+
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \
104+
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-backports main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \
105+
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \
106+
echo "deb-src [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \
107+
echo "deb-src [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \
108+
echo "deb-src [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-backports main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \
109+
echo "deb-src [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy main restricted universe multiverse" | tee -a /etc/apt/sources.list ; \
110+
else \
111+
echo "No valid CPU_ARCHITECTURE specified"; \
112+
fi
117113

118114
# remove newer python version, freeze other versions for max compatibility before updates
119115
RUN apt --fix-missing purge $(dpkg -l | grep 'python3\.1[01]' | awk '{print $2}')

0 commit comments

Comments
 (0)