Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions docker/base-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,21 @@ FROM gcc:14.2.0

ENV DEBIAN_FRONTEND=noninteractive

COPY debian-backports.sources /etc/apt/sources.list.d/
COPY backports.pref /etc/apt/preferences.d/

WORKDIR /azp

RUN \
echo "APT::Get::Assume-Yes \"true\";" > /etc/apt/apt.conf.d/90assumeyes \
&& echo "KNP_IMAGE_VERSION=${KNP_IMAGE_VERSION}" >> /etc/environment \
&& export DEBIAN_VERSION=debian$(cat /etc/debian_version | sed 's/\..*//') \
&& apt-get update \
&& apt-get -y --no-install-recommends --show-progress install \
apt-transport-https \
build-essential \
ca-certificates \
cmake \
cmake="3.31*" cmake-data="3.31*" \
curl \
gdbserver \
git \
Expand All @@ -55,18 +59,7 @@ RUN \
wget \
zip \
$(apt list|awk '/boost.*1.81.*-dev/ {print($1);}') \
&& apt-get clean \
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
gpg --dearmor | tee /etc/apt/keyrings/docker.gpg > /dev/null \
&& add-apt-repository \
"deb [arch=$(echo ${TARGETPLATFORM}|cut -f2 -d/)] https://download.docker.com/linux/ubuntu \
mantic \
stable" \
&& export VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | jq .name -r) \
&& export DESTINATION=/usr/local/bin/docker-compose \
&& curl -L https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-`uname -s`-`uname -m` -o "${DESTINATION}" \
&& chmod +x ${DESTINATION} \
&& ln -sf ${DESTINATION} /usr/bin/docker-compose
&& apt-get clean

RUN rm -rf /tmp/*

Expand Down
19 changes: 19 additions & 0 deletions docker/base-image/backports.pref
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Preferences file for the Docker image.
#
# © 2024-2026 AO Kaspersky Lab
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

Package: *
Pin: release n=bookworm-backports
Pin-Priority: 100
21 changes: 21 additions & 0 deletions docker/base-image/debian-backports.sources
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Backports file for the Docker image.
#
# © 2024-2026 AO Kaspersky Lab
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

Types: deb
URIs: http://deb.debian.org/debian
Suites: bookworm-backports
Components: main
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
3 changes: 2 additions & 1 deletion docker/base-image/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ CUDA_VERSION="12.9"

function install_cuda_debian() {
export DEBIAN_VERSION=debian$(cat /etc/debian_version | sed 's/\..*//')

echo "[INFO] Installing CUDA for ${DEBIAN_VERSION}..."

CUDA_PKG_VERSION=$(echo ${CUDA_VERSION}|tr '.' '-')

# cuda-keyring package adds correct repository.
curl -fS https://developer.download.nvidia.com/compute/cuda/repos/${DEBIAN_VERSION}/x86_64/cuda-keyring_1.1-1_all.deb -o cuda-keyring_1.1-1_all.deb \
&& dpkg -i cuda-keyring_1.1-1_all.deb \
&& DEBIAN_FRONTEND=noninteractive dpkg -i cuda-keyring_1.1-1_all.deb \
&& rm -f cuda-keyring_1.1-1_all.deb \
&& curl -sSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xA4B469963BF863CC" | \
gpg --dearmor | tee /etc/apt/keyrings/cuda.gpg > /dev/null \
Expand Down
Loading