lightning/.azure
awaelchli 330af381de
Remove the lightning app code (#20039)
* remove source, tests, docs, workflows

* update checkgroup

* update codeowners

* update workflows

* package setup

* config files

* update

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove entry point

* docs

* __main__

* remove store

* leftover store removals

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-07-05 13:56:29 +02:00
..
README.md ci: add description how to clean machines (#18553) 2023-09-14 23:57:47 +02:00
gpu-benchmarks.yml Add PyTorch 2.3 to CI matrix (#19708) 2024-04-29 07:16:13 -04:00
gpu-tests-fabric.yml Add testing for PyTorch 2.4 (Fabric) (#20028) 2024-07-02 18:01:03 -04:00
gpu-tests-pytorch.yml Replace usage of `grep -P` with `perl` in `run_standalone_tests.sh` (#19942) 2024-06-05 12:32:56 -04:00
start.sh CI: Use self-hosted Azure GPU runners (#14632) 2022-10-05 10:43:54 +00:00

README.md

Creation GPU self-hosted agent pool

Prepare the machine

This is a slightly modified version of the script from https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/docker

apt-get update
apt-get install -y --no-install-recommends \
    ca-certificates \
    curl \
    jq \
    git \
    iputils-ping \
    libcurl4 \
    libunwind8 \
    netcat \
    libssl1.0

curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
mkdir /azp

Stating the agents

export TARGETARCH=linux-x64
export AZP_URL="https://dev.azure.com/Lightning-AI"
export AZP_TOKEN="xxxxxxxxxxxxxxxxxxxxxxxxxx"
export AZP_POOL="lit-rtx-3090"

for i in {0..7..2}
do
     nohup bash .azure/start.sh \
        "AZP_AGENT_NAME=litGPU-YX_$i,$((i+1))" \
        "CUDA_VISIBLE_DEVICES=$i,$((i+1))" \
     > "agent-$i.log" &
done

Check running agents

ps aux | grep start.sh

Machine maintenance

Since most of our jobs/checks are running in a Docker container, the OS/machine can become polluted and fail to run with errors such as:

No space left on device : '/azp/agent-litGPU-21_0,1/_diag/pages/8bb191f4-a8c2-419a-8788-66e3f0522bea_1.log'

In such cases, you need to log in to the machine and run docker system prune.

Automated ways

Let's explore adding a cron job for periodically removing all Docker caches:

  1. Open your user's cron tab for editing: crontab -e
  2. Schedule/add the command with the --force flag to force pruning without interactive confirmation:
    # every day at 2:00 AM clean docker caches
    0 2 * * * docker system prune --force
    
  3. Verify the entry: crontab -l

Note: You may need to add yourself to the Docker group by running sudo usermod -aG docker <your_username> to have permission to execute this command without needing sudo and entering the password.