Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x11-drivers/nvidia-drivers: Add GPU test and move package to /usr #932

Merged
merged 3 commits into from
Jun 16, 2023
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
1 change: 1 addition & 0 deletions changelog/changes/2023-06-16-nvidia-drivers-525.105.17.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Migrated the NVIDIA installer from the Azure/AWS OEM partition to `/usr` to make it available on all platforms ([scripts#932](https://github.com/flatcar/scripts/pull/932/), [Flatcar#1077](https://github.com/flatcar/Flatcar/issues/1077))
4 changes: 2 additions & 2 deletions ci-automation/vendor-testing/azure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ query_kola_tests() {
kola list --platform=azure --filter "${@}"
}

other_instance_types=()
other_instance_types=("Standard_NC6s_v3")
if [[ "${CIA_ARCH}" = 'amd64' ]]; then
other_instance_types+=('V1')
fi
Expand All @@ -85,6 +85,6 @@ run_kola_tests_on_instances \
"${CIA_FIRST_RUN}" \
"${other_instance_types[@]}" \
'--' \
'cl.internet' \
'cl.internet' 'cl.misc.nvidia'\
'--' \
"${@}"
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ RDEPEND="${RDEPEND}
sys-power/acpid
sys-process/lsof
sys-process/procps
x11-drivers/nvidia-metadata
x11-drivers/nvidia-drivers
"

# OEM specific bits that need to go in USR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ IUSE=""

RDEPEND="
~app-emulation/wa-linux-agent-${PV}
x11-drivers/nvidia-drivers
"

# for coreos-base/common-oem-files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
"enabled": true,
"contents": "[Unit]\nDescription=amazon-ssm-agent\nAfter=network-online.target\n\n[Service]\nType=simple\nWorkingDirectory=/oem\nExecStart=/oem/bin/amazon-ssm-agent\nKillMode=process\nRestart=on-failure\nRestartForceExitStatus=SIGPIPE\nRestartSec=15min\n\n[Install]\nWantedBy=multi-user.target\n"
},
{
"name": "nvidia.service",
"enabled": true
}
]
},
"storage": {
Expand Down Expand Up @@ -45,14 +41,6 @@
},
"mode": 493
},
{
"filesystem": "root",
"path": "/etc/systemd/system/nvidia.service",
"contents": {
"source": "oem:///units/nvidia.service"
},
"mode": 292
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ REQUIRED_USE="^^ ( ec2 openstack brightbox )"
RDEPEND="
ec2? ( app-emulation/amazon-ssm-agent )
coreos-base/flatcar-eks
x11-drivers/nvidia-drivers
"

# no source directory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,4 @@ RDEPEND="
coreos-base/coreos
coreos-base/coreos-dev
coreos-base/flatcar-eks
x11-drivers/nvidia-drivers
"
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,12 @@ function download_flatcar_developer_container() {
then
rm -f "${FLATCAR_ROOT_WORKDIR}/"flatcar_developer_container*.bin
FLATCAR_REMOTE_FILENAME=${FLATCAR_DEVELOPER_CONTAINER%%-*}.bin.bz2
if [[ "$GROUP" == "developer" ]]
if [[ "$(curl -I --retry-delay 1 --retry 60 --retry-connrefused --retry-max-time 60 --connect-timeout 20 -L -s -o /dev/null -w "%{http_code}" "https://${GROUP}.release.flatcar-linux.net/${FLATCAR_RELEASE_BOARD}/${FLATCAR_RELEASE_VERSION}/${FLATCAR_REMOTE_FILENAME}")" == 200 ]]
then
FLATCAR_DEVELOPER_CONTAINER_URL="https://bucket.release.flatcar-linux.net/flatcar-jenkins/developer/developer/boards/${FLATCAR_RELEASE_BOARD}/${FLATCAR_RELEASE_VERSION}/${FLATCAR_REMOTE_FILENAME}"
else if [[ "$(curl -I -s -o /dev/null -w "%{http_code}" "https://${GROUP}.release.flatcar-linux.net/${FLATCAR_RELEASE_BOARD}/${FLATCAR_RELEASE_VERSION}/${FLATCAR_REMOTE_FILENAME}")" == 200 ]]
then
FLATCAR_DEVELOPER_CONTAINER_URL="https://${GROUP}.release.flatcar-linux.net/${FLATCAR_RELEASE_BOARD}/${FLATCAR_RELEASE_VERSION}/${FLATCAR_REMOTE_FILENAME}"
else
FLATCAR_DEVELOPER_CONTAINER_URL="https://bucket.release.flatcar-linux.net/flatcar-jenkins/${GROUP}/boards/${FLATCAR_RELEASE_BOARD}/${FLATCAR_RELEASE_VERSION}/${FLATCAR_REMOTE_FILENAME}"
fi
FLATCAR_DEVELOPER_CONTAINER_URL="https://${GROUP}.release.flatcar-linux.net/${FLATCAR_RELEASE_BOARD}/${FLATCAR_RELEASE_VERSION}/${FLATCAR_REMOTE_FILENAME}"
else
FLATCAR_RELEASE_BOARD=${FLATCAR_RELEASE_BOARD//-usr/}
FLATCAR_DEVELOPER_CONTAINER_URL="https://bincache.flatcar-linux.net/images/${FLATCAR_RELEASE_BOARD}/${FLATCAR_RELEASE_VERSION}/${FLATCAR_REMOTE_FILENAME}"
fi

if [ ! -n "${FLATCAR_DEVELOPER_CONTAINER_URL}" ]
Expand Down Expand Up @@ -70,7 +67,7 @@ function extract_nvidia_installer() {
function run_nspawn_container() {
echo Spawn system-nspawn container to install the NVIDIA drivers

sudo systemd-nspawn --read-only --volatile=overlay --image="${FLATCAR_ROOT_WORKDIR}/${FLATCAR_DEVELOPER_CONTAINER}" --bind="${FLATCAR_ROOT_WORKDIR}/${NVIDIA_WORKDIR}":/nvidia --bind=/oem/bin:/app/bin/ /app/bin/install-nvidia "$NVIDIA_DRIVER_BASENAME"
sudo systemd-nspawn --read-only --volatile=overlay --image="${FLATCAR_ROOT_WORKDIR}/${FLATCAR_DEVELOPER_CONTAINER}" --bind="${FLATCAR_ROOT_WORKDIR}/${NVIDIA_WORKDIR}":/nvidia --bind=/usr/lib/nvidia/bin:/app/bin/ /app/bin/install-nvidia "$NVIDIA_DRIVER_BASENAME"
}

function copy_nvidia_build_artifacts() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ After=network-online.target
Type=simple
Restart=no
Environment=PATH=/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
ExecStart=/oem/bin/setup-nvidia
ExecStart=/usr/lib/nvidia/bin/setup-nvidia

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

EAPI=7

inherit systemd

DESCRIPTION="NVIDIA drivers"
HOMEPAGE=""
SRC_URI=""
Expand All @@ -15,14 +17,12 @@ IUSE=""
# no source directory
S="${WORKDIR}"

RDEPEND="
=x11-drivers/nvidia-metadata-${PV}
"

src_install() {
insinto "/oem"
doins -r "${FILESDIR}/units"
exeinto "/oem/bin"
systemd_dounit "${FILESDIR}/units/nvidia.service"
systemd_enable_service multi-user.target nvidia.service
exeinto "/usr/lib/nvidia/bin"
doexe "${FILESDIR}/bin/install-nvidia"
doexe "${FILESDIR}/bin/setup-nvidia"
insinto "/usr/share/flatcar"
doins "${FILESDIR}/nvidia-metadata"
}

This file was deleted.