Behind firewall installation instructions

Hello. Need instructions and assistance on installing NVIDIA GPU docker containers on our recently purchased AMD threadripper. It’s behind a firewall with no internet connection. I assume lambda stack is pre-installed on the machine, so need to transfer files/containers via USB stick… Lambdalabs website indicate that this is possible.

  1. Lambda stack is installed.

  2. You also need to install other packages for docker:
    Tutorial: NVIDIA NGC Tutorial: Run a PyTorch Docker Container using nvidia-container-toolkit on Ubuntu
    sudo apt-get install -y docker.io nvidia-container-toolkit
    sudo systemctl daemon-reload
    sudo systemctl restart docker

    • So doing the mirror repository on-site is the likely solution so it can also keep up to date.
      (or for some sites using a proxy server to allow specific sites). See below.
    • To just download/copy a package:
      $ mkdir download
      $ cd download
      $ apt download docker.io nvidia-container-toolkit
      $ ls
      docker.io_20.10.7-0ubuntu5~20.04.2_amd64.deb
      nvidia-container-toolkit_1.5.1+dfsg-0lambda0.20.04.1_amd64.deb
      Then copy those or dependencies over that you need.
      You can see the dependencies with:
      $ apt-cache show docker.io
      Depends: adduser, containerd (>= 1.2.6-0ubuntu1~), iptables,
      debconf (>= 0.5) | debconf-2.0, libc6 (>= 2.8), libdevmapper1.02.1 (>= 2:1.02.97),
      libseccomp2 (>= 2.1.0), libsystemd0 (>= 209~)
      $ apt-cache show nvidia-container-toolkit
      Depends: libnvidia-container-tools (>= 1.4.0)
  3. For moving a docker image:
    docker pull image:tag
    docker save image:tag -o file.tar

    Then on the new machine (airgapped)
    docker load -i file.tar

    Save those to a device that you can move to the airgapped location.
    In the airgapped you can use those on the local machine or on a local registry server.
    
    Setting up a local docker registry server:
         https://docs.docker.com/registry/deploying/
    

For setting up a mirrored repository:
I was able to setup a mirrored repository from the Lambda stack:

$ sudo cp /etc/apt/mirror.list /etc/apt/mirror.list-bak
$ sudo vi /etc/apt/mirror.list

$ diff /etc/apt/mirror.list /etc/apt/mirror.list-bak
12d11
< set base_path /var/www/html/ubuntu
17d15
< deb http://archive.lambdalabs.com/ubuntu focal main
… acommented out all other repositories(Ubuntu)…

$ sudo mkdir -p /var/www/html/ubuntu/var
$ sudo cp /var/spool/apt-mirror/var/postmirror.sh /var/www/html/ubuntu/var
$ sudo apt-mirror
$ find /var/www/html -name ‘*.deb’ | wc -l
311

$ du -sh /var/www/html/ubuntu
5.6G /var/www/html/ubuntu