This repository has been archived by the owner on Jan 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for building NVIDIA UMD/KMD disk
Add support to the kokoro job script to generate a disk that contains the UMD/KMD NVIDIA modules and corresponding support files required for instances that use a NVIDIA gpu. The disk is generated from a preprocessed package that contains NVIDIA kernel headers and UMD stored in GCS. To create an NVIDIA disk the script requires setting the NVIDIA_DRIVER_VERSION env var. If the var is not set it will generate a new kernel image with the AMD modules. The disk is not self contained and must be mounted with the corresponding kernel disk. Bug: 231133651 Change-Id: I8547c908bc68fe86877139da962008a7a93c3f9a
- Loading branch information
Showing
6 changed files
with
195 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
stadia/nvrootfs/usr/lib/systemd/system/modprobe-nvidiagpu.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[Unit] | ||
Description=Load nvidiagpu | ||
DefaultDependencies=no | ||
Conflicts=shutdown.target | ||
Before=sysinit.target shutdown.target | ||
Before=systemd-modules-load.service | ||
After=local-fs.target | ||
ConditionCapability=CAP_SYS_MODULE | ||
ConditionKernelCommandLine=|!nogpu | ||
|
||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=yes | ||
ExecStart=/usr/libexec/modprobe-nvidiagpu.sh | ||
TimeoutSec=90s |
1 change: 1 addition & 0 deletions
1
stadia/nvrootfs/usr/lib/systemd/system/sysinit.target.wants/modprobe-nvidiagpu.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../modprobe-nvidiagpu.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
# Copyright 2022 Google LLC | ||
# | ||
# 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 | ||
# | ||
# https://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. | ||
|
||
depmod | ||
modprobe nvidia-drm | ||
modprobe nvidia-uvm | ||
modprobe nvidia |