Dont throw an error on windows trying to patch resource.setrlimit - i… #112
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Image CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: ["main", "test", "hotfix"] | |
tags: ["v*"] | |
jobs: | |
build-cuda118: | |
strategy: | |
matrix: | |
target: ["basic", "xformers", "bundle"] | |
cuda: ["11.6.2", "11.7.1", "11.8.0"] | |
#runs-on: self-hosted | |
runs-on: ubuntu-latest | |
steps: | |
- name: Maximise space | |
run: | | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /usr/local/lib/android | |
sudo rm -rf /opt/ghc | |
df -h | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: "recursive" | |
- name: Calculate cuda ver | |
run: echo "CUDA_VER=$(echo ${{ matrix.cuda }} | cut -d. -f-2 | tr -d .)" >> $GITHUB_ENV | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
flavor: | | |
latest=false | |
prefix=cuda${{ env.CUDA_VER }}-${{ matrix.target }}-,onlatest=true | |
images: | | |
hafriedlander/gyre | |
ghcr.io/stablecabal/gyre | |
tags: | | |
type=semver,pattern={{version}} | |
type=raw,value=latest,enable={{is_default_branch}} | |
type=raw,value=test,enable=${{ github.ref == format('refs/heads/{0}', 'test') }} | |
type=raw,value=hotfix,enable=${{ github.ref == format('refs/heads/{0}', 'hotfix') }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
target: ${{ matrix.target }} | |
context: . | |
file: Dockerfile | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
build-args: | | |
CUDA_VER=${{ env.CUDA_VER }} | |
CUDA_FULLVER=${{ matrix.cuda }} | |
MAX_JOBS=1 | |
XFORMERS_REPO=https://github.com/facebookresearch/xformers.git | |
XFORMERS_REF=v0.0.18 | |
TRITON_REF=8650b4d | |
DEEPSPEED_REF=tags/v0.7.6 | |
FLYINGDOG_REF=${{ github.ref == 'refs/heads/test' && 'main' || '070cbff' }} |