Skip to content

Commit

Permalink
Merge branch 'extract-binary2' into update-localai210
Browse files Browse the repository at this point in the history
  • Loading branch information
sozercan committed Dec 17, 2023
2 parents 8d4cf7f + e7940f0 commit 88591cf
Showing 1 changed file with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions .github/workflows/extract-binary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 88591cf

Please sign in to comment.