File size: 1,406 Bytes
bcc78d8
 
 
 
 
 
 
9ca358b
bcc78d8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
553c80f
9ca358b
 
 
 
 
 
 
 
 
 
 
 
553c80f
bcc78d8
9ca358b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: e2e-docker-tests

on:
  pull_request:
    paths:
      - '**.py'
      - 'requirements.txt'
      - '.github/workflows/*.yml'
  workflow_dispatch:

jobs:
  build-axolotl:
    if: github.repository_owner == 'OpenAccess-AI-Collective'
    # this job needs to be run on self-hosted GPU runners...
    strategy:
      fail-fast: false
      matrix:
        include:
          - cuda: 118
            cuda_version: 11.8.0
            python_version: "3.10"
            pytorch: 2.0.1
          - cuda: 121
            cuda_version: 12.1.0
            python_version: "3.10"
            pytorch: 2.1.1
    runs-on: [self-hosted, gpu, docker]
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Build Docker image
        run: |
          # Set up build arguments
          BASE_TAG="main-base-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}"
          CUDA="${{ matrix.cuda }}"
          PYTORCH_VERSION="${{ matrix.pytorch }}"
          # Build the Docker image
          docker build . \
            --file ./docker/Dockerfile \
            --build-arg BASE_TAG=$BASE_TAG \
            --build-arg CUDA=$CUDA \
            --build-arg PYTORCH_VERSION=$PYTORCH_VERSION \
            --tag test-axolotl
      - name: Unit Tests w docker image
        run: |
          docker run --rm test-axolotl pytest --ignore=tests/e2e/ /workspace/axolotl/tests/