TT Lab
Get started
Learn Learning paths Courses

Air-Gapped GPU Driver Installation

Installing From an Offline Repository

Continue in TT Lab

Goal

You stand up a repository from the imported .deb bundle and install the driver, confirm that the toolkit cannot be installed with the first import alone, and then complete it by adding the second import batch. It is exactly the real air-gapped procedure.

Why it matters

If you install imported files one by one with dpkg -i, a person has to get the order right and has to remember that order again next time. If you make it a repository, apt resolves the graph and that repository keeps being reused. And the installation simulation (-s) is the final answer to whether the import succeeded — if unmet dependencies appear here, that list is the second import list.

You continue using the /root/gpu/pool you made in the previous lab (gpu-deps).

Steps

  1. Add a Release file to /root/gpu/pool. It must have the six keys Origin, Label, Suite, Codename, Architectures, and Components, one line each, and Architectures must include amd64.
  2. Register this repository with /etc/apt/sources.list.d/gpu-airgap.list and refresh the index. Then save the output of apt-cache policy nvidia-driver-550 to /root/gpu/policy.txt.
  3. Simulate the installation of nvidia-driver-550 and save the output to /root/gpu/sim-driver.txt. There must be 11 lines starting with Inst.
  4. Simulate the installation of nvidia-container-toolkit, confirm that it fails, and save the output (including standard error) to /root/gpu/sim-toolkit-fail.txt. The file must mention libnvidia-container1.
  5. Build the packages in /opt/fixtures/gpu-airgap/src2/, add them to /root/gpu/pool/, rebuild the index, and refresh the index. There must be 15 Package: entries.
  6. Actually install nvidia-driver-550 and nvidia-container-toolkit.
  7. Check the state of the packages starting with nvidia or libnvidia with dpkg -l and save it to /root/gpu/installed.txt. Every line must be in the ii state.
  8. Make /root/gpu/install-report.txt with the following 4 lines. DRIVER_VERSION=<nvidia-driver-550 의 설치된 버전> / TOOLKIT_VERSION=<nvidia-container-toolkit 의 설치된 버전> / INSTALLED=<이름이 nvidia 또는 libnvidia 로 시작하는 설치된 패키지 수> / SECOND_INTAKE=libnvidia-container1 (the placeholders are the installed version of nvidia-driver-550, the installed version of nvidia-container-toolkit, and the number of installed packages whose names start with nvidia or libnvidia)

Notes

Configure the repository from the imported batch

Add a Release file to /root/gpu/pool. It must have the six keys Origin, Label, Suite, Codename, Architectures, and Components, one line each, and Architectures must include amd64.

Use the pool you made in the previous lab as it is. Make the Release file too.

Register and refresh the repository

Register this repository with /etc/apt/sources.list.d/gpu-airgap.list and refresh the index. Then save the output of apt-cache policy nvidia-driver-550 to /root/gpu/policy.txt.

It is the flat repository format. You must refresh the index after registering for the packages to show up.

Simulate the driver installation

Simulate the installation of nvidia-driver-550 and save the output to /root/gpu/sim-driver.txt. There must be 11 lines starting with Inst.

The -s option changes nothing and only prints the plan. Count the lines starting with Inst.

Confirm that the toolkit installation is blocked

Simulate the installation of nvidia-container-toolkit, confirm that it fails, and save the output (including standard error) to /root/gpu/sim-toolkit-fail.txt. The file must mention libnvidia-container1.

If you run the same simulation with the toolkit, it fails. Save the error output as it is.

Add the second import batch

Build the packages in /opt/fixtures/gpu-airgap/src2/, add them to /root/gpu/pool/, rebuild the index, and refresh the index. There must be 15 Package: entries.

The shortfall is in the src2 directory. Build it, put it in the pool, and rebuild the index.

Actual installation

Actually install nvidia-driver-550 and nvidia-container-toolkit.

You can install the driver and the toolkit in one go. Check the state after installing.

Verify the installation state

Check the state of the packages starting with nvidia or libnvidia with dpkg -l and save it to /root/gpu/installed.txt. Every line must be in the ii state.

The state markers of dpkg -l must all be ii. If anything is not, the installation is not finished.

Installation report

Make /root/gpu/install-report.txt with the following 4 lines. DRIVER_VERSION=<nvidia-driver-550 의 설치된 버전> / TOOLKIT_VERSION=<nvidia-container-toolkit 의 설치된 버전> / INSTALLED=<이름이 nvidia 또는 libnvidia 로 시작하는 설치된 패키지 수> / SECOND_INTAKE=libnvidia-container1 (the placeholders are the installed version of nvidia-driver-550, the installed version of nvidia-container-toolkit, and the number of installed packages whose names start with nvidia or libnvidia)

Gather the number of installed packages and the versions. The values must be the actual query results.