Skip to content

DevOps ~ Github Runners

Matt McGurn edited this page Aug 4, 2023 · 15 revisions

macRunner

The setup required to run a Mac as a GitHub runner for CHREST

Setup

  1. Install colima and docker for Mac using Homebrew. This only needs to be done once.

    brew install colima
    brew install docker docker-compose
    # follow the on screen instructions for docker-compose
    
    brew install docker-buildx
    # Follow the caveats mentioned in the install instructions for buildx
  2. Start Colima with increased parameters

    # starts colima with 4 cores, 12 GB of memory, and 300GB of disk space
    colima start --cpu 4 --memory 12 --disk 300 --network-driver slirp
    
  3. Start the service for both arm and x86_64

docker run -d --restart always --name GitHub-runner-00 \
  -e RUNNER_NAME="chrest-runner-jarvis-00" \
  -e ACCESS_TOKEN="ADD-ACCESS_TOKEN" \
  -e RUNNER_SCOPE="org" \
  -e ORG_NAME="UBCHREST" \
  -e LABELS="arm64" \
  -v /var/run/docker.sock:/var/run/docker.sock \
  --platform linux/arm64 \
  myoung34/github-runner:latest

docker run -d --restart always --name GitHub-runner-01 \
  -e RUNNER_NAME="chrest-runner-jarvis-01" \
  -e ACCESS_TOKEN="ADD-ACCESS_TOKEN" \
  -e RUNNER_SCOPE="org" \
  -e ORG_NAME="UBCHREST" \
  -e LABELS="arm64" \
  -v /var/run/docker.sock:/var/run/docker.sock \
  --platform linux/arm64 \
  myoung34/github-runner:latest

See Create GitHub personal access token for creating a PAT.

Linux NVIDIA GPU Jetson Orin Nano

Setup

  1. Setup the Jetson Orin Nano to boot from the SSD (https://www.youtube.com/watch?v=Ucg5Zqm9ZMk)

  2. Install the latest version of Docker

  3. Setup Docker to run without sudo/root.

  4. Set Nvidia as the default docker runtime

    /etc/docker/daemon.json

    {
      "data-root": "/mnt/docker-storage",
      "default-runtime": "nvidia",
      "runtimes": {
          "nvidia": {
              "path": "nvidia-container-runtime",
              "runtimeArgs": []
          }
      }
    }
  5. Install NVIDIA Container Toolkit

  6. (Optional) Test the configuration with L4T without the runtime specifically set.