feat: add authorization for self-hosted runner

This commit is contained in:
Junya Morioka
2025-12-04 15:39:36 +09:00
parent b7dfa77278
commit e538e76c04
4 changed files with 29 additions and 11 deletions
+4 -3
View File
@@ -23,7 +23,7 @@ jobs:
fail-fast: false
matrix:
flash-attn-version: ["2.8.0"]
python-version: ["3.11"]
python-version: ["3.11", "3.12"]
torch-version: ["2.7.1"]
# https://developer.nvidia.com/cuda-toolkit-archive
cuda-version: ["12.8.1"]
@@ -92,6 +92,7 @@ jobs:
- name: Build wheels
timeout-minutes: 1200
id: build_wheels
shell: bash
env:
MAX_JOBS: 4
@@ -105,7 +106,8 @@ jobs:
- name: Install Test
shell: bash
run: |
pip install --no-cache-dir --force-reinstall flash-attention/dist/${{ env.wheel_name }}
pip uninstall -y flash-attn > /dev/null 2>&1
pip install --no-cache-dir flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }}
python -c "import flash_attn; print(flash_attn.__version__)"
- name: Clean up
@@ -113,4 +115,3 @@ jobs:
if: always()
run: |
rm -rf /opt/hostedtoolcache/Python
rm -rf ~/.cache/pip
+19 -6
View File
@@ -1,12 +1,13 @@
FROM ubuntu:24.04
ARG REPOSITORY_URL
ARG PERSONAL_ACCESS_TOKEN
ARG GH_RUNNER_VERSION="2.324.0"
ARG REPOSITORY_URL="https://github.com/user/repo"
ARG GH_RUNNER_VERSION="2.329.0"
ARG RUNNER_NAME="self-hosted-github-actions-runner"
ARG RUNNER_GROUP="default"
ARG RUNNER_LABELS="self-hosted,Linux"
ARG TARGET_ARCH="x64"
ARG PERSONAL_ACCESS_TOKEN=""
ARG REGISTRY_TOKEN=""
ENV DEBIAN_FRONTEND=noninteractive \
AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache
@@ -65,14 +66,26 @@ RUN curl -fsSL -o actions-runner.tar.gz -L "https://github.com/actions/runner/re
&& tar xf actions-runner.tar.gz \
&& rm actions-runner.tar.gz \
&& sudo ./bin/installdependencies.sh \
&& ./config.sh \
&& if [ -n "$PERSONAL_ACCESS_TOKEN" ]; then \
./config.sh \
--unattended \
--url $REPOSITORY_URL \
--pat $PERSONAL_ACCESS_TOKEN \
--pat "$PERSONAL_ACCESS_TOKEN" \
--name $RUNNER_NAME \
--runnergroup $RUNNER_GROUP \
--labels "${RUNNER_LABELS},${TARGET_ARCH}" \
--work /home/ubuntu/actions-runner \
--replace
--replace; \
else \
./config.sh \
--unattended \
--url $REPOSITORY_URL \
--token "$REGISTRY_TOKEN" \
--name $RUNNER_NAME \
--runnergroup $RUNNER_GROUP \
--labels "${RUNNER_LABELS},${TARGET_ARCH}" \
--work /home/ubuntu/actions-runner \
--replace; \
fi
CMD ["./run.sh"]
+4 -2
View File
@@ -2,14 +2,16 @@ services:
runner:
privileged: true
restart: always
env_file:
- .env
build:
context: .
dockerfile: Dockerfile
args:
REPOSITORY_URL: https://github.com/mjun0812/flash-attention-prebuild-wheels
PERSONAL_ACCESS_TOKEN: $PERSONAL_ACCESS_TOKEN
GH_RUNNER_VERSION: 2.327.1
GH_RUNNER_VERSION: 2.329.0
RUNNER_NAME: self-hosted-runner
RUNNER_GROUP: default
RUNNER_LABELS: self-hosted
RUNNER_LABELS: self-hosted,Linux
TARGET_ARCH: x64
+2
View File
@@ -1 +1,3 @@
PERSONAL_ACCESS_TOKEN=
REGISTRY_TOKEN=
RUNNER_LABELS=Linux,self-hosted