diff --git a/.github/workflows/test-self-hosted.yml b/.github/workflows/test-self-hosted.yml index a89b414..8536fc3 100644 --- a/.github/workflows/test-self-hosted.yml +++ b/.github/workflows/test-self-hosted.yml @@ -11,6 +11,16 @@ jobs: - run: ls - run: pwd + containers-test: + runs-on: + - self-hosted + container: + image: ubuntu:22.04 + timeout-minutes: 10 + steps: + - run: ls + - run: pwd + test-build: runs-on: - self-hosted @@ -18,11 +28,11 @@ jobs: strategy: fail-fast: false matrix: - flash-attn-version: ["2.4.3", "2.5.9"] + flash-attn-version: ["2.4.3"] python-version: ["3.12"] torch-version: ["2.7.0"] # https://developer.nvidia.com/cuda-toolkit-archive - cuda-version: ["12.8.1"] + cuda-version: ["11.8.0", "12.8.1"] steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 diff --git a/self-hosted-runner/Dockerfile b/self-hosted-runner/Dockerfile index 973962e..51f36d3 100644 --- a/self-hosted-runner/Dockerfile +++ b/self-hosted-runner/Dockerfile @@ -8,13 +8,21 @@ ARG RUNNER_GROUP="default" ARG RUNNER_LABELS="self-hosted,Linux" ARG TARGET_ARCH="x64" -ENV DEBIAN_FRONTEND=noninteractive +ENV DEBIAN_FRONTEND=noninteractive \ + AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache + +RUN mkdir -p /opt/hostedtoolcache RUN apt-get update && apt-get install -y --no-install-recommends\ curl \ ca-certificates \ sudo \ software-properties-common \ + wget \ + unzip \ + zip \ + git \ + libc-bin \ && rm -rf /var/lib/apt/lists/* # Install Docker @@ -29,21 +37,26 @@ 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 \ + 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 # ubuntu >= 24.04 image has user named 'ubuntu' -RUN usermod -aG sudo ubuntu +RUN usermod -aG sudo ubuntu \ + && usermod -aG docker ubuntu # Allow sudo without password RUN echo '%sudo ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers +COPY entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/entrypoint.sh"] + USER ubuntu WORKDIR /home/ubuntu @@ -61,4 +74,4 @@ RUN curl -fsSL -o actions-runner.tar.gz -L "https://github.com/actions/runner/re --work /home/ubuntu/actions-runner \ --replace -CMD ["./run.sh"] \ No newline at end of file +CMD ["./run.sh"] diff --git a/self-hosted-runner/compose.yml b/self-hosted-runner/compose.yml index 9c6eef6..b2d8055 100644 --- a/self-hosted-runner/compose.yml +++ b/self-hosted-runner/compose.yml @@ -1,5 +1,6 @@ services: runner: + privileged: true build: context: . dockerfile: Dockerfile @@ -11,7 +12,3 @@ services: RUNNER_GROUP: default RUNNER_LABELS: self-hosted TARGET_ARCH: x64 - volumes: - - /var/run/docker.sock:/var/run/docker.sock - group_add: - - "${DOCKER_GID}" diff --git a/self-hosted-runner/entrypoint.sh b/self-hosted-runner/entrypoint.sh new file mode 100644 index 0000000..d56b933 --- /dev/null +++ b/self-hosted-runner/entrypoint.sh @@ -0,0 +1,7 @@ +#!/bin/bash +id + +# Start docker daemon +sudo service docker start + +exec "$@" \ No newline at end of file