Skip to content

Commit

Permalink
[CI] Additional tricks to save space building and publishing TR image (
Browse files Browse the repository at this point in the history
…#540)

### Summary of changes

These changes attempt to remove additional default packages from the
base runner to create some additional space for TR image build and
publish step.
  • Loading branch information
myedibleenso authored Oct 2, 2023
1 parent 1dfcf02 commit 54ee37b
Showing 1 changed file with 20 additions and 23 deletions.
43 changes: 20 additions & 23 deletions .github/workflows/text-reading-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@ jobs:
steps:
# Setup docker
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
# for multi-arch builds (ex. ARM 64)
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: --debug
driver: docker
# - name: Prepare buildx builder
# run: |
# docker buildx create --use --name "multiarch-builder" --platform linux/amd64,linux/arm64 --driver "docker-container"
Expand All @@ -61,19 +62,25 @@ jobs:
echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
# Checkout code
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.LUM_ASKEM_DOCKERHUB_USERNAME }}
password: ${{ secrets.LUM_ASKEM_DOCKERHUB_TOKEN }}
# - name: "Free disk space"
# run: |
# sudo apt clean
# sudo rm -rf /usr/share/dotnet
# sudo rm -rf /opt/ghc
# sudo rm -rf "/usr/local/share/boost"
# sudo rm -rf "$AGENT_TOOLSDIRECTORY"

########################################
# lumai/askem-skema-text-reading
########################################
- name: Setup JDK (w/ SBT)
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
# Unfortunately, this will immediately
# blow through the GH Actions cache...
#cache: 'sbt'

# The TR image is huge.
# We need to free up every last bit of space we can.
- name: Free disk space (aggressively)
Expand All @@ -86,19 +93,9 @@ jobs:
large-packages: true
docker-images: true
swap-storage: true
tool-cache: false
# NOTE: this might remove things we actually need.
tool-cache: true

########################################
# lumai/askem-skema-text-reading
########################################
- name: Setup JDK (w/ SBT)
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
# Unfortunately, this will immediately
# blow through the GH Actions cache...
#cache: 'sbt'
- name: Generate Dockerfile (TR)
working-directory: ./skema/text_reading/scala
env:
Expand Down

0 comments on commit 54ee37b

Please sign in to comment.