Skip to content

Commit 1829ddd

Browse files
authored
Merge pull request #190 from artiomn/master
Build image fixed, CUDA started to build: #21
2 parents 4b2f8e9 + 0c8d09b commit 1829ddd

4 files changed

Lines changed: 48 additions & 14 deletions

File tree

docker/base-image/Dockerfile

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,21 @@ FROM gcc:14.2.0
2020

2121
ENV DEBIAN_FRONTEND=noninteractive
2222

23+
COPY debian-backports.sources /etc/apt/sources.list.d/
24+
COPY backports.pref /etc/apt/preferences.d/
25+
2326
WORKDIR /azp
2427

2528
RUN \
2629
echo "APT::Get::Assume-Yes \"true\";" > /etc/apt/apt.conf.d/90assumeyes \
30+
&& echo "KNP_IMAGE_VERSION=${KNP_IMAGE_VERSION}" >> /etc/environment \
2731
&& export DEBIAN_VERSION=debian$(cat /etc/debian_version | sed 's/\..*//') \
2832
&& apt-get update \
2933
&& apt-get -y --no-install-recommends --show-progress install \
3034
apt-transport-https \
3135
build-essential \
3236
ca-certificates \
33-
cmake \
37+
cmake="3.31*" cmake-data="3.31*" \
3438
curl \
3539
gdbserver \
3640
git \
@@ -55,18 +59,7 @@ RUN \
5559
wget \
5660
zip \
5761
$(apt list|awk '/boost.*1.81.*-dev/ {print($1);}') \
58-
&& apt-get clean \
59-
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
60-
gpg --dearmor | tee /etc/apt/keyrings/docker.gpg > /dev/null \
61-
&& add-apt-repository \
62-
"deb [arch=$(echo ${TARGETPLATFORM}|cut -f2 -d/)] https://download.docker.com/linux/ubuntu \
63-
mantic \
64-
stable" \
65-
&& export VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | jq .name -r) \
66-
&& export DESTINATION=/usr/local/bin/docker-compose \
67-
&& curl -L https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-`uname -s`-`uname -m` -o "${DESTINATION}" \
68-
&& chmod +x ${DESTINATION} \
69-
&& ln -sf ${DESTINATION} /usr/bin/docker-compose
62+
&& apt-get clean
7063

7164
RUN rm -rf /tmp/*
7265

docker/base-image/backports.pref

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Preferences file for the Docker image.
2+
#
3+
# © 2024-2026 AO Kaspersky Lab
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
Package: *
18+
Pin: release n=bookworm-backports
19+
Pin-Priority: 100
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Backports file for the Docker image.
2+
#
3+
# © 2024-2026 AO Kaspersky Lab
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
Types: deb
18+
URIs: http://deb.debian.org/debian
19+
Suites: bookworm-backports
20+
Components: main
21+
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

docker/base-image/start.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,14 @@ CUDA_VERSION="12.9"
2727

2828
function install_cuda_debian() {
2929
export DEBIAN_VERSION=debian$(cat /etc/debian_version | sed 's/\..*//')
30+
3031
echo "[INFO] Installing CUDA for ${DEBIAN_VERSION}..."
3132

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

3435
# cuda-keyring package adds correct repository.
3536
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 \
36-
&& dpkg -i cuda-keyring_1.1-1_all.deb \
37+
&& DEBIAN_FRONTEND=noninteractive dpkg -i cuda-keyring_1.1-1_all.deb \
3738
&& rm -f cuda-keyring_1.1-1_all.deb \
3839
&& curl -sSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xA4B469963BF863CC" | \
3940
gpg --dearmor | tee /etc/apt/keyrings/cuda.gpg > /dev/null \

0 commit comments

Comments
 (0)