Merge pull request #6 from mjun0812/feature/add-self-hosted-runner

[WIP] fix self hosted runner
This commit is contained in:
Junya Morioka
2025-05-17 14:43:10 +09:00
committed by GitHub
3 changed files with 13 additions and 13 deletions
+1 -5
View File
@@ -7,8 +7,6 @@ jobs:
runs-on:
- self-hosted
timeout-minutes: 10
container:
image: ghcr.io/actions/actions-runner:latest
steps:
- run: ls
- run: pwd
@@ -20,13 +18,11 @@ jobs:
strategy:
fail-fast: false
matrix:
flash-attn-version: ["2.4.3"]
flash-attn-version: ["2.4.3", "2.5.9"]
python-version: ["3.12"]
torch-version: ["2.7.0"]
# https://developer.nvidia.com/cuda-toolkit-archive
cuda-version: ["12.8.1"]
container:
image: ghcr.io/actions/actions-runner
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
+10 -7
View File
@@ -1,4 +1,4 @@
FROM ubuntu:latest
FROM ubuntu:24.04
ARG REPOSITORY_URL
ARG PERSONAL_ACCESS_TOKEN
@@ -29,20 +29,23 @@ RUN install -m 0755 -d /etc/apt/keyrings \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
docker-ce-cli \
# docker-ce \
# containerd.io \
# docker-buildx-plugin \
# docker-compose-plugin \
&& rm -rf /var/lib/apt/lists/*
# Install dotnet
RUN add-apt-repository ppa:dotnet/backports
# Create runner user and setup group
RUN useradd -mr -d /home/runner runner \
&& usermod -aG sudo runner
# ubuntu >= 24.04 image has user named 'ubuntu'
RUN usermod -aG sudo ubuntu
# Allow sudo without password
RUN echo '%sudo ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
USER runner
WORKDIR /home/runner
USER ubuntu
WORKDIR /home/ubuntu
RUN curl -fsSL -o actions-runner.tar.gz -L "https://github.com/actions/runner/releases/download/v${GH_RUNNER_VERSION}/actions-runner-linux-${TARGET_ARCH}-${GH_RUNNER_VERSION}.tar.gz" \
&& tar xf actions-runner.tar.gz \
@@ -55,7 +58,7 @@ RUN curl -fsSL -o actions-runner.tar.gz -L "https://github.com/actions/runner/re
--name $RUNNER_NAME \
--runnergroup $RUNNER_GROUP \
--labels "${RUNNER_LABELS},${TARGET_ARCH}" \
--work /home/runner/actions-runner \
--work /home/ubuntu/actions-runner \
--replace
CMD ["./run.sh"]
+2 -1
View File
@@ -4,8 +4,9 @@ services:
context: .
dockerfile: Dockerfile
args:
PERSONAL_ACCESS_TOKEN: $PERSONAL_ACCESS_TOKEN
REPOSITORY_URL: https://github.com/mjun0812/flash-attention-prebuild-wheels
PERSONAL_ACCESS_TOKEN: $PERSONAL_ACCESS_TOKEN
GH_RUNNER_VERSION: 2.324.0
RUNNER_NAME: self-hosted-runner
RUNNER_GROUP: default
RUNNER_LABELS: self-hosted