Skip to content

Commit

Permalink
Compress images to improve download/upload speed (#1932)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathbunnyru committed Jul 3, 2023
1 parent c44f6e9 commit 2df2eec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions .github/actions/load-image/action.yml
Expand Up @@ -21,9 +21,6 @@ runs:
path: /tmp/jupyter/images/
- name: Load downloaded image to docker 📥
run: |
docker load --input /tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}.tar
zstd --uncompress --stdout --rm /tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}.tar.zst | docker load
docker image ls --all
shell: bash
- name: Delete the file 🗑️
run: rm /tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}.tar
shell: bash
4 changes: 2 additions & 2 deletions .github/workflows/docker-build-test-upload.yml
Expand Up @@ -96,11 +96,11 @@ jobs:
- name: Save image as a tar for later use 💾
run: |
mkdir -p /tmp/jupyter/images/
docker save ${{ env.OWNER }}/${{ inputs.image }} -o /tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}.tar
docker save ${{ env.OWNER }}/${{ inputs.image }} | zstd > /tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}.tar.zst
shell: bash
- name: Upload image as artifact 💾
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.image }}-${{ inputs.platform }}
path: /tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}.tar
path: /tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}.tar.zst
retention-days: 3

0 comments on commit 2df2eec

Please sign in to comment.