Skip to content

Commit

Permalink
build(torch): Lower ccache size, and use ccache for more steps
Browse files Browse the repository at this point in the history
  • Loading branch information
Eta0 committed Dec 22, 2023
1 parent 3ce72cc commit 9a3b179
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/torch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
folder: torch
tag-suffix: ${{ inputs.tag }}
build-args: |
BUILD_CCACHE_SIZE=20Gi
BUILD_CCACHE_SIZE=15Gi
BUILDER_BASE_IMAGE=${{ inputs.builder-base-image }}
FINAL_BASE_IMAGE=${{ inputs.base-image }}
BUILD_TORCH_VERSION=${{ inputs.torch-version }}
Expand Down
2 changes: 2 additions & 0 deletions torch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ RUN pip3 install --no-cache-dir --upgrade \
matplotlib numpy typing_extensions requests pillow

RUN --mount=type=bind,from=torchvision-downloader,source=/git/vision,target=vision/,rw \
--mount=type=cache,target=/ccache \
export MAX_JOBS="$(./effective_cpu_count.sh)" && \
cd vision && \
mkdir build && \
Expand Down Expand Up @@ -248,6 +249,7 @@ RUN pip3 install --no-cache-dir --upgrade \
matplotlib numpy typing_extensions requests pillow

RUN --mount=type=bind,from=torchaudio-downloader,source=/git/audio,target=audio/,rw \
--mount=type=cache,target=/ccache \
export MAX_JOBS="$(./effective_cpu_count.sh)" && \
cd audio && \
mkdir build && \
Expand Down

0 comments on commit 9a3b179

Please sign in to comment.