Skip to content

Commit f48b30a

Browse files
authored
[CI] [GHA] Introduce additional Ubuntu versions via separate workflows (#25234)
### Details: - This is a sister PR to #25202, the idea is the same: test more Linux flavours. This PR adds Ubuntu 22/24 as separate workflows instead of a matrix used in #25202. - The approach with separate workflows seems better as it does not require unique names for artefacts for matrix jobs and dependent jobs thus making it easier to write and maintain w/o magic strings. ### Tickets: - *144917*
1 parent 161fce5 commit f48b30a

File tree

23 files changed

+830
-361
lines changed

23 files changed

+830
-361
lines changed

.github/actions/create_manifest/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ runs:
3535
id: create_manifest
3636
shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }}
3737
run: >-
38-
python ${{ env.ACTION_PATH }}/create_manifest.py
38+
python3 ${{ env.ACTION_PATH }}/create_manifest.py
3939
--target_arch "${{ inputs.target_arch }}" --build_type "${{ inputs.build_type }}"
4040
--save_to "${{ inputs.save_to }}" --product_type "${{ inputs.product_type }}" -r "${{ inputs.repos }}"
4141
env:

.github/actions/store_artifacts/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ runs:
3131
id: copy_artifacts
3232
shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }}
3333
run: >-
34-
python ${{ env.ACTION_PATH }}/store_artifacts.py
34+
python3 ${{ env.ACTION_PATH }}/store_artifacts.py
3535
--storage_dir "${{ inputs.storage_dir }}" --storage_root "${{ inputs.storage_root }}"
3636
-a "${{ inputs.artifacts }}"
3737
env:

.github/dockerfiles/docker_tag

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pr-25303
1+
pr-25234

.github/dockerfiles/ov_build/ubuntu_20_04_x64/Dockerfile

+2-15
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,8 @@ RUN apt-get update && \
1919
apt-get install \
2020
curl \
2121
git \
22-
ca-certificates \
2322
gpg-agent \
2423
tzdata \
25-
# Pythons
26-
python3.8-dev \
27-
python3.8-venv \
28-
python3.8-distutils \
29-
python3.11-dev \
30-
python3.11-venv \
31-
python3.11-distutils \
3224
# For Java API
3325
default-jdk \
3426
# Compiler \
@@ -57,16 +49,11 @@ RUN mkdir ${SCCACHE_HOME} && cd ${SCCACHE_HOME} && \
5749
curl -SLO https://github.com/mozilla/sccache/releases/download/${SCCACHE_VERSION}/${SCCACHE_ARCHIVE} && \
5850
tar -xzf ${SCCACHE_ARCHIVE} --strip-components=1 && rm ${SCCACHE_ARCHIVE}
5951

52+
ENV PATH="$SCCACHE_HOME:$PATH"
6053
# Setup pip
6154
ENV PIP_VERSION="24.0"
6255
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
63-
python3.8 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
64-
python3.11 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
56+
python3 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
6557
rm -f get-pip.py
6658

67-
# Use Python 3.11 as default instead of Python 3.8
68-
# Using venv here 'cause other methods to switch the default Python on Ubuntu 20 break both system and wheels build
69-
RUN python3.11 -m venv venv
70-
ENV PATH="/venv/bin:$SCCACHE_HOME:$PATH"
71-
7259
ENV PIP_CACHE_DIR=/mount/caches/pip/linux/${PIP_VERSION}

.github/dockerfiles/ov_build/ubuntu_22_04_x64/Dockerfile

+5-15
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,15 @@ RUN apt-get update && \
1919
apt-get install \
2020
curl \
2121
git \
22-
ca-certificates \
2322
gpg-agent \
2423
tzdata \
2524
libtbb2 \
26-
# Pythons
27-
python3.8-dev \
28-
python3.8-venv \
29-
python3.8-distutils \
25+
# Pythons \
3026
python3.11-dev \
3127
python3.11-venv \
3228
python3.11-distutils \
3329
# For Java API
3430
default-jdk \
35-
# Compiler \
36-
gcc-10 \
37-
g++-10 \
3831
&& \
3932
rm -rf /var/lib/apt/lists/*
4033

@@ -44,10 +37,6 @@ RUN chmod +x /install_build_dependencies.sh && \
4437
/install_build_dependencies.sh && \
4538
rm -rf /var/lib/apt/lists/*
4639

47-
# Set gcc-10 as a default compiler
48-
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 30 && \
49-
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 30
50-
5140
# Install sscache
5241
ARG SCCACHE_VERSION="v0.7.5"
5342
ENV SCCACHE_HOME="/opt/sccache" \
@@ -58,15 +47,16 @@ RUN mkdir ${SCCACHE_HOME} && cd ${SCCACHE_HOME} && \
5847
curl -SLO https://github.com/mozilla/sccache/releases/download/${SCCACHE_VERSION}/${SCCACHE_ARCHIVE} && \
5948
tar -xzf ${SCCACHE_ARCHIVE} --strip-components=1 && rm ${SCCACHE_ARCHIVE}
6049

50+
ENV PATH="$SCCACHE_HOME:$PATH"
6151
# Setup pip
6252
ENV PIP_VERSION="24.0"
6353
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
64-
python3.8 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
54+
python3 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
6555
python3.11 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
6656
rm -f get-pip.py
6757

68-
# Use Python 3.11 as default instead of Python 3.8
69-
# Using venv here 'cause other methods to switch the default Python on Ubuntu 20 break both system and wheels build
58+
# Use Python 3.11 as default
59+
# Using venv here 'cause other methods to switch the default Python on Ubuntu break both system and wheels build
7060
RUN python3.11 -m venv venv
7161
ENV PATH="/venv/bin:$SCCACHE_HOME:$PATH"
7262

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
FROM openvinogithubactions.azurecr.io/dockerhub/nvidia/cuda:11.8.0-runtime-ubuntu22.04
2+
3+
USER root
4+
5+
# APT configuration
6+
RUN echo 'Acquire::Retries "10";' > /etc/apt/apt.conf && \
7+
echo 'APT::Get::Assume-Yes "true";' >> /etc/apt/apt.conf && \
8+
echo 'APT::Get::Fix-Broken "true";' >> /etc/apt/apt.conf && \
9+
echo 'APT::Get::no-install-recommends "true";' >> /etc/apt/apt.conf
10+
11+
ENV DEBIAN_FRONTEND="noninteractive" \
12+
TZ="Europe/London"
13+
14+
RUN apt-get update && \
15+
apt-get install software-properties-common && \
16+
add-apt-repository --yes --no-update ppa:git-core/ppa && \
17+
add-apt-repository --yes --no-update ppa:deadsnakes/ppa && \
18+
apt-get update && \
19+
apt-get install \
20+
curl \
21+
wget \
22+
git \
23+
gpg-agent \
24+
tzdata \
25+
# Python
26+
python3.11-dev \
27+
python3.11-venv \
28+
python3.11-distutils \
29+
# For Java API
30+
default-jdk \
31+
&& \
32+
rm -rf /var/lib/apt/lists/*
33+
34+
# Install build dependencies
35+
ADD install_build_dependencies.sh /install_build_dependencies.sh
36+
RUN chmod +x /install_build_dependencies.sh && \
37+
/install_build_dependencies.sh && \
38+
rm -rf /var/lib/apt/lists/*
39+
40+
# Install sscache
41+
ARG SCCACHE_VERSION="v0.7.5"
42+
ENV SCCACHE_HOME="/opt/sccache" \
43+
SCCACHE_PATH="/opt/sccache/sccache"
44+
45+
RUN mkdir ${SCCACHE_HOME} && cd ${SCCACHE_HOME} && \
46+
SCCACHE_ARCHIVE="sccache-${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz" && \
47+
curl -SLO https://github.com/mozilla/sccache/releases/download/${SCCACHE_VERSION}/${SCCACHE_ARCHIVE} && \
48+
tar -xzf ${SCCACHE_ARCHIVE} --strip-components=1 && rm ${SCCACHE_ARCHIVE}
49+
50+
# Install CUDA
51+
RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb && \
52+
dpkg -i cuda-keyring_1.1-1_all.deb
53+
RUN apt-get update && apt-get install -y cuda-runtime-11-8 cuda-11-8 && apt-get install -y \
54+
libcudnn8=8.9.4.*-1+cuda11.8 \
55+
libcudnn8-dev=8.9.4.*-1+cuda11.8 \
56+
libcudnn8-samples=8.9.4.*-1+cuda11.8 \
57+
libcutensor1=1.7.0.1-1 \
58+
libcutensor-dev=1.7.0.1-1 \
59+
cuda-drivers
60+
61+
# Setup pip
62+
ENV PIP_VERSION="24.0"
63+
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
64+
python3.11 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
65+
rm -f get-pip.py
66+
67+
# Use Python 3.11 as default
68+
# Using venv here 'cause other methods to switch the default Python on Ubuntu 22 break both system and wheels build
69+
RUN python3.11 -m venv venv
70+
ENV PATH="/venv/bin:$SCCACHE_HOME:$PATH"
71+
72+
ENV PIP_CACHE_DIR=/mount/caches/pip/linux/${PIP_VERSION}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
FROM openvinogithubactions.azurecr.io/dockerhub/ubuntu:24.04
2+
3+
USER root
4+
5+
# APT configuration
6+
RUN echo 'Acquire::Retries "10";' > /etc/apt/apt.conf && \
7+
echo 'APT::Get::Assume-Yes "true";' >> /etc/apt/apt.conf && \
8+
echo 'APT::Get::Fix-Broken "true";' >> /etc/apt/apt.conf && \
9+
echo 'APT::Get::no-install-recommends "true";' >> /etc/apt/apt.conf
10+
11+
ENV DEBIAN_FRONTEND="noninteractive" \
12+
TZ="Europe/London"
13+
14+
RUN apt-get update && \
15+
apt-get install software-properties-common && \
16+
add-apt-repository --yes --no-update ppa:git-core/ppa && \
17+
add-apt-repository --yes --no-update ppa:deadsnakes/ppa && \
18+
apt-get update && \
19+
apt-get install \
20+
curl \
21+
git \
22+
gpg-agent \
23+
tzdata \
24+
# Python
25+
python3-dev \
26+
python3-venv \
27+
python3-pip \
28+
python3-full \
29+
# For Java API
30+
default-jdk \
31+
# Compiler. TODO: remove and use the system one; if the system one is used, onnx fails to build
32+
gcc-10 \
33+
g++-10 \
34+
&& \
35+
rm -rf /var/lib/apt/lists/*
36+
37+
# Install build dependencies
38+
ADD install_build_dependencies.sh /install_build_dependencies.sh
39+
RUN chmod +x /install_build_dependencies.sh && \
40+
/install_build_dependencies.sh && \
41+
rm -rf /var/lib/apt/lists/*
42+
43+
# Set gcc-10 as a default compiler
44+
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 30 && \
45+
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 30
46+
47+
# Install sccache
48+
ARG SCCACHE_VERSION="v0.7.5"
49+
ENV SCCACHE_HOME="/opt/sccache" \
50+
SCCACHE_PATH="/opt/sccache/sccache"
51+
52+
RUN mkdir ${SCCACHE_HOME} && cd ${SCCACHE_HOME} && \
53+
SCCACHE_ARCHIVE="sccache-${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz" && \
54+
curl -SLO https://github.com/mozilla/sccache/releases/download/${SCCACHE_VERSION}/${SCCACHE_ARCHIVE} && \
55+
tar -xzf ${SCCACHE_ARCHIVE} --strip-components=1 && rm ${SCCACHE_ARCHIVE}
56+
57+
ENV PATH="$SCCACHE_HOME:$PATH"
58+
59+
# Create a virtual environment for the system Python as Python in Ubuntu 24 complains about installing
60+
# packages into the system Python
61+
RUN python3 -m venv venv
62+
ENV PATH="/venv/bin:$PATH"
63+
64+
# Setup pip
65+
ENV PIP_VERSION="24.0"
66+
RUN /venv/bin/python3 -m pip install --upgrade pip==${PIP_VERSION}
67+
68+
ENV PIP_CACHE_DIR=/mount/caches/pip/linux/${PIP_VERSION}

.github/dockerfiles/ov_test/ubuntu_20_04_x64/Dockerfile

+5-17
Original file line numberDiff line numberDiff line change
@@ -19,34 +19,22 @@ RUN apt-get update && \
1919
apt-get install \
2020
curl \
2121
git \
22-
ca-certificates \
2322
gpg-agent \
2423
tzdata \
25-
# Python
26-
python3.11-dev \
27-
python3.11-venv \
28-
python3.11-distutils \
2924
libhdf5-dev \
3025
&& \
3126
rm -rf /var/lib/apt/lists/*
3227

33-
# Install build dependencies
34-
ADD install_build_dependencies.sh /install_build_dependencies.sh
35-
RUN chmod +x /install_build_dependencies.sh && \
36-
/install_build_dependencies.sh && \
28+
# Install openvino dependencies
29+
ADD scripts/install_dependencies/install_openvino_dependencies.sh /install_openvino_dependencies.sh
30+
RUN chmod +x /install_openvino_dependencies.sh && \
31+
/install_openvino_dependencies.sh && \
3732
rm -rf /var/lib/apt/lists/*
3833

3934
# Setup pip
4035
ENV PIP_VERSION="24.0"
4136
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
42-
python3.8 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
43-
python3.11 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
37+
python3 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
4438
rm -f get-pip.py
4539

46-
# Use Python 3.11 as default instead of Python 3.8
47-
# Using venv here 'cause other methods to switch the default Python on Ubuntu 20 break both system and wheels build
48-
RUN python3.11 -m venv venv
49-
ENV PATH="/venv/bin:$SCCACHE_HOME:$PATH"
50-
5140
ENV PIP_CACHE_DIR=/mount/caches/pip/linux/${PIP_VERSION}
52-
ENV PIP_INSTALL_PATH=/venv/lib/python3.11/site-packages

.github/dockerfiles/ov_test/ubuntu_22_04_x64/Dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ RUN apt-get update && \
3030
&& \
3131
rm -rf /var/lib/apt/lists/*
3232

33-
# Install build dependencies
34-
ADD install_build_dependencies.sh /install_build_dependencies.sh
35-
RUN chmod +x /install_build_dependencies.sh && \
36-
/install_build_dependencies.sh && \
33+
# Install openvino dependencies
34+
ADD scripts/install_dependencies/install_openvino_dependencies.sh /install_openvino_dependencies.sh
35+
RUN chmod +x /install_openvino_dependencies.sh && \
36+
/install_openvino_dependencies.sh && \
3737
rm -rf /var/lib/apt/lists/*
3838

3939
# Setup pip
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
FROM openvinogithubactions.azurecr.io/dockerhub/ubuntu:24.04
2+
3+
USER root
4+
5+
# APT configuration
6+
RUN echo 'Acquire::Retries "10";' > /etc/apt/apt.conf && \
7+
echo 'APT::Get::Assume-Yes "true";' >> /etc/apt/apt.conf && \
8+
echo 'APT::Get::Fix-Broken "true";' >> /etc/apt/apt.conf && \
9+
echo 'APT::Get::no-install-recommends "true";' >> /etc/apt/apt.conf
10+
11+
ENV DEBIAN_FRONTEND="noninteractive" \
12+
TZ="Europe/London"
13+
14+
RUN apt-get update && \
15+
apt-get install software-properties-common && \
16+
apt-get update && \
17+
apt-get install \
18+
curl \
19+
git \
20+
gpg-agent \
21+
tzdata \
22+
# Python
23+
python3-full \
24+
libhdf5-dev \
25+
&& \
26+
rm -rf /var/lib/apt/lists/*
27+
28+
# Install openvino dependencies
29+
ADD scripts/install_dependencies/install_openvino_dependencies.sh /install_openvino_dependencies.sh
30+
RUN chmod +x /install_openvino_dependencies.sh && \
31+
/install_openvino_dependencies.sh && \
32+
rm -rf /var/lib/apt/lists/*
33+
34+
# Create a virtual environment for the system Python as Python in Ubuntu 24 complains about installing
35+
# packages into the system Python
36+
RUN python3 -m venv venv
37+
ENV PATH="/venv/bin:$PATH"
38+
39+
# Setup pip
40+
ENV PIP_VERSION="24.0"
41+
RUN /venv/bin/python3 -m pip install --upgrade pip==${PIP_VERSION}
42+
43+
ENV PIP_CACHE_DIR=/mount/caches/pip/linux/${PIP_VERSION}
44+
ENV PIP_INSTALL_PATH=/venv/lib/python3/site-packages

0 commit comments

Comments
 (0)