run the docker image builds and push on gh action gpu runners (#1218)
Browse files- .github/workflows/base.yml +1 -1
- .github/workflows/main.yml +3 -14
.github/workflows/base.yml
CHANGED
|
@@ -7,7 +7,7 @@ jobs:
|
|
| 7 |
build-base:
|
| 8 |
if: github.repository_owner == 'OpenAccess-AI-Collective'
|
| 9 |
# this job needs to be run on self-hosted GPU runners...
|
| 10 |
-
runs-on:
|
| 11 |
strategy:
|
| 12 |
fail-fast: false
|
| 13 |
matrix:
|
|
|
|
| 7 |
build-base:
|
| 8 |
if: github.repository_owner == 'OpenAccess-AI-Collective'
|
| 9 |
# this job needs to be run on self-hosted GPU runners...
|
| 10 |
+
runs-on: axolotl-gpu-runner
|
| 11 |
strategy:
|
| 12 |
fail-fast: false
|
| 13 |
matrix:
|
.github/workflows/main.yml
CHANGED
|
@@ -9,7 +9,6 @@ on:
|
|
| 9 |
jobs:
|
| 10 |
build-axolotl:
|
| 11 |
if: ${{ ! contains(github.event.commits[0].message, '[skip docker]]') && github.repository_owner == 'OpenAccess-AI-Collective' }}
|
| 12 |
-
# this job needs to be run on self-hosted GPU runners...
|
| 13 |
strategy:
|
| 14 |
fail-fast: false
|
| 15 |
matrix:
|
|
@@ -35,7 +34,7 @@ jobs:
|
|
| 35 |
python_version: "3.11"
|
| 36 |
pytorch: 2.1.2
|
| 37 |
axolotl_extras:
|
| 38 |
-
runs-on:
|
| 39 |
steps:
|
| 40 |
- name: Checkout
|
| 41 |
uses: actions/checkout@v4
|
|
@@ -62,21 +61,11 @@ jobs:
|
|
| 62 |
CUDA=${{ matrix.cuda }}
|
| 63 |
PYTORCH_VERSION=${{ matrix.pytorch }}
|
| 64 |
file: ./docker/Dockerfile
|
|
|
|
| 65 |
tags: |
|
| 66 |
${{ steps.metadata.outputs.tags }}-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }}
|
| 67 |
${{ (matrix.is_latest) && format('{0}-latest', steps.metadata.outputs.tags) || '' }}
|
| 68 |
labels: ${{ steps.metadata.outputs.labels }}
|
| 69 |
-
- name: Unit Tests
|
| 70 |
-
run: |
|
| 71 |
-
docker run --rm ${{ steps.metadata.outputs.tags }}-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }} pytest --ignore=tests/e2e/ /workspace/axolotl/tests/
|
| 72 |
-
- name: Push to Docker Hub
|
| 73 |
-
if: github.event_name != 'pull_request'
|
| 74 |
-
run: |
|
| 75 |
-
docker push ${{ steps.metadata.outputs.tags }}-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }}
|
| 76 |
-
latest_tag=${{ (matrix.is_latest) && format('{0}-latest', steps.metadata.outputs.tags) || '' }}
|
| 77 |
-
if [ -n "$latest_tag" ]; then
|
| 78 |
-
docker push "$latest_tag"
|
| 79 |
-
fi
|
| 80 |
|
| 81 |
build-axolotl-runpod:
|
| 82 |
needs: build-axolotl
|
|
@@ -106,7 +95,7 @@ jobs:
|
|
| 106 |
python_version: "3.11"
|
| 107 |
pytorch: 2.1.2
|
| 108 |
axolotl_extras:
|
| 109 |
-
runs-on:
|
| 110 |
steps:
|
| 111 |
- name: Checkout
|
| 112 |
uses: actions/checkout@v4
|
|
|
|
| 9 |
jobs:
|
| 10 |
build-axolotl:
|
| 11 |
if: ${{ ! contains(github.event.commits[0].message, '[skip docker]]') && github.repository_owner == 'OpenAccess-AI-Collective' }}
|
|
|
|
| 12 |
strategy:
|
| 13 |
fail-fast: false
|
| 14 |
matrix:
|
|
|
|
| 34 |
python_version: "3.11"
|
| 35 |
pytorch: 2.1.2
|
| 36 |
axolotl_extras:
|
| 37 |
+
runs-on: axolotl-gpu-runner
|
| 38 |
steps:
|
| 39 |
- name: Checkout
|
| 40 |
uses: actions/checkout@v4
|
|
|
|
| 61 |
CUDA=${{ matrix.cuda }}
|
| 62 |
PYTORCH_VERSION=${{ matrix.pytorch }}
|
| 63 |
file: ./docker/Dockerfile
|
| 64 |
+
push: ${{ github.event_name != 'pull_request' }}
|
| 65 |
tags: |
|
| 66 |
${{ steps.metadata.outputs.tags }}-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }}
|
| 67 |
${{ (matrix.is_latest) && format('{0}-latest', steps.metadata.outputs.tags) || '' }}
|
| 68 |
labels: ${{ steps.metadata.outputs.labels }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
|
| 70 |
build-axolotl-runpod:
|
| 71 |
needs: build-axolotl
|
|
|
|
| 95 |
python_version: "3.11"
|
| 96 |
pytorch: 2.1.2
|
| 97 |
axolotl_extras:
|
| 98 |
+
runs-on: axolotl-gpu-runner
|
| 99 |
steps:
|
| 100 |
- name: Checkout
|
| 101 |
uses: actions/checkout@v4
|