Migrate to 1ES pipeline (#95)

This commit is contained in:
Yuge Zhang
2025-09-18 20:26:16 +08:00
committed by GitHub
parent 5724f63cfc
commit f6db2dc8ab
3 changed files with 67 additions and 7 deletions
+2 -5
View File
@@ -10,22 +10,19 @@ on:
jobs:
examples:
runs-on: [self-hosted, linux, gpu]
runs-on: [self-hosted, 1ES.Pool=agl-runner-gpu]
timeout-minutes: 60
strategy:
matrix:
setup: [stable, latest]
fail-fast: false
container:
image: ghcr.io/microsoft/agent-lightning/base:latest
options: --gpus all --ipc=host --interactive --tty
steps:
- name: Check GPU status
run: nvidia-smi
- uses: actions/checkout@v4
- name: Create a virtual environment
run: python3 -m venv .venv
- name: Install deps inside the container (${{ matrix.setup }})
- name: Install dependencies (${{ matrix.setup }})
run: |
. .venv/bin/activate
./scripts/setup_${{ matrix.setup }}_gpu.sh
+63
View File
@@ -0,0 +1,63 @@
#!/bin/bash
# Based on: Standard_NC24ads_A100_v4
# With: Canonical:ubuntu-24_04-lts:server:latest
# Secure boot is off.
# This script is not designed to be run automatically.
set -ex
# Build essentials are required.
sudo apt-get clean
sudo apt-get update
sudo apt-get install -y \
git \
wget \
curl \
build-essential \
software-properties-common \
python3-dev \
python3-pip \
python3-venv \
graphviz \
unzip \
tmux \
vim \
git-lfs \
nodejs
git lfs install
# VM with GPU needs to install drivers. Reference:
# https://docs.microsoft.com/en-us/azure/virtual-machines/linux/n-series-driver-setup
sudo apt update && sudo apt install -y ubuntu-drivers-common
sudo ubuntu-drivers install
sudo reboot now
# Install CUDA Toolkit
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get -y install cuda-toolkit-12-8
sudo reboot now
# Add paths globally
sudo bash -c "cat > /etc/profile.d/cuda.sh" <<'EOF'
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
EOF
sudo chmod +x /etc/profile.d/cuda.sh
# Disable the periodical apt-get upgrade.
# Sometimes, unattended upgrade blocks apt-get install
sudo sed -i -e "s/Update-Package-Lists \"1\"/Update-Package-Lists \"0\"/g" /etc/apt/apt.conf.d/10periodic
sudo sed -i -e "s/Update-Package-Lists \"1\"/Update-Package-Lists \"0\"/g" /etc/apt/apt.conf.d/20auto-upgrades
sudo sed -i -e "s/Unattended-Upgrade \"1\"/Unattended-Upgrade \"0\"/g" /etc/apt/apt.conf.d/20auto-upgrades
sudo systemctl stop apt-daily.timer apt-daily-upgrade.timer
sudo systemctl stop apt-daily.service apt-daily-upgrade.service
sudo systemctl mask apt-daily.timer apt-daily-upgrade.timer
sudo systemctl mask apt-daily.service apt-daily-upgrade.service
# Deprovision and prepare for generalized image
sudo waagent -deprovision+user
+2 -2
View File
@@ -4,10 +4,10 @@ python -m pip install --upgrade --no-cache-dir pip
pip install --no-cache-dir packaging ninja numpy pandas ipython ipykernel gdown wheel setuptools
# This has to be pinned for VLLM to work.
pip install --no-cache-dir torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu128
pip install --no-cache-dir torch==2.8.0 torchvision==0.23.0 --index-url https://download.pytorch.org/whl/cu128
pip install --no-cache-dir flash-attn --no-build-isolation
# This must match pytorch version.
pip install --no-cache-dir vllm==0.10.1.1
pip install --no-cache-dir vllm==0.10.2
# Latest VERL release version.
pip install --no-cache-dir verl