diff --git a/.github/workflows/extract-binary.yaml b/.github/workflows/extract-binary.yaml index 701eb2b2..5910570a 100644 --- a/.github/workflows/extract-binary.yaml +++ b/.github/workflows/extract-binary.yaml @@ -17,30 +17,41 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 240 steps: + - uses: easimon/maximize-build-space@master + with: + remove-dotnet: 'true' + remove-docker-images: 'true' + remove-codeql: 'true' + remove-haskell: 'true' + remove-android: 'true' + - name: cleanup disk space run: | - docker system prune -f -a --volumes - sudo rm -rf /usr/share/dotnet - sudo rm -rf /opt/ghc - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf "$AGENT_TOOLSDIRECTORY" + # docker system prune -f -a --volumes + # sudo rm -rf /usr/share/dotnet + # sudo rm -rf /opt/ghc + # sudo rm -rf "/usr/local/share/boost" + # sudo rm -rf "$AGENT_TOOLSDIRECTORY" + df -H + - name: install oras env: ORAS_VERSION: 1.1.0 run: | - curl -sL "https://github.com/oras-project/oras/releases/download/v${ORAS_VERSION}/oras_${ORAS_VERSION}_linux_amd64.tar.gz + curl -sLO "https://github.com/oras-project/oras/releases/download/v${ORAS_VERSION}/oras_${ORAS_VERSION}_linux_amd64.tar.gz" tar -zxvf oras_${ORAS_VERSION}_linux_amd64.tar.gz -C /usr/local/bin/ oras - name: install crane env: CRANE_VERSION: 0.17.0 run: | - curl -sL "https://github.com/google/go-containerregistry/releases/download/v${CRANE_VERSION}/go-containerregistry_Linux_x86_64.tar.gz" > go-containerregistry.tar.gz - tar -zxvf go-containerregistry.tar.gz -C /usr/local/bin/ crane + curl -sLO "https://github.com/google/go-containerregistry/releases/download/v${CRANE_VERSION}/go-containerregistry_Linux_x86_64.tar.gz" + tar -zxvf go-containerregistry_Linux_x86_64.tar.gz -C /usr/local/bin/ crane - - name: extract local-ai gpu binary + - name: extract artifacts from local-ai container run: | - crane export quay.io/go-skynet/local-ai:v2.0.0-cublas-cuda12 - | tar -Oxf - build/local-ai > local-ai + crane export quay.io/go-skynet/local-ai:v2.0.0-cublas-cuda12 > export.tar + tar -xvf export.tar build - name: Login to GHCR uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 @@ -51,4 +62,6 @@ jobs: - name: create and push oci artifact run: | - oras push ghcr.io/sozercan/test/local-ai:v2.0.0-cublas-cuda12 local-ai:application/octet-stream + oras push ghcr.io/sozercan/test/local-ai:v2.0.0-cublas-cuda12 \ + build/local-ai:application/octet-stream \ + build/backend-assets/:application/octet-stream