Skip to content

fix: bump rotary and adjust top level images #32

fix: bump rotary and adjust top level images

fix: bump rotary and adjust top level images #32

name: Deploy to Hugging Face Spaces
on:
push:
branches: [ main ]
workflow_dispatch:
env:
OMP_NUM_THREADS: 8
MKL_NUM_THREADS: 8
jobs:
build-and-deploy-gpu:
name: Build & Deploy (GPU)
runs-on:
group: aws-g6e-4xlarge
container:
image: pytorch/pytorch:2.3.1-cuda12.1-cudnn8-runtime
options: --gpus all --ipc host --shm-size "16gb"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Show NVIDIA GPUs
run: |
nvidia-smi || true
- name: System deps (git, curl, etc.)
run: |
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
git curl ca-certificates build-essential
rm -rf /var/lib/apt/lists/*
- name: Install Node.js (for act)
if: ${{ env.ACT }}
run: |
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y nodejs
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: latest
- name: Prepare Python 3.11
run: |
echo "Installing Python 3.11"
uv python install 3.11
echo "UV_PYTHON=3.11" >> "$GITHUB_ENV"
- name: Build site with uvnote (GPU available)
run: |
# If your build uses CUDA, it will see the GPUs here.
# --strict will fail if any cells do not succeed.
uvx --refresh https://github.com/drbh/uvnote.git build benches --strict
- name: Deploy to Hugging Face Space
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
# Upload the built site/ directory to the Space, cleaning removed files
echo "Deploying to Hugging Face Space kernels-community/kernels-benchmarks"
uvx --from huggingface-hub hf upload \
--token "$HF_TOKEN" \
--exclude "*.json" \
--exclude "*.pt" \
--repo-type space \
kernels-community/kernels-benchmarks \
site/ /