Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: ./hack/free-disk-space.sh
- run: docker build --file test/images/nvidia/Dockerfile .
build-image-nvidia-training:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: ./hack/free-disk-space.sh
- run: |
docker build --file test/images/nvidia-training/Dockerfile test/images/nvidia-training \
--build-arg PYTORCH_BUILD_ENV="MAX_JOBS=$(($(nproc) - 2)) USE_MKLDNN=0 USE_DISTRIBUTED=0 USE_CUDA=0 USE_ROCM=0 USE_CAFFE2=0 USE_QNNPACK=0 USE_NNPACK=0 USE_XNNPACK=0 USE_MPS=0 BUILD_SHARED_LIBS=OFF USE_FLASH_ATTENTION=0 USE_MEM_EFF_ATTENTION=0 BUILD_TEST=0"
build-image-nvidia-inference:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# hack to free up disk space for build
# ref: https://github.com/easimon/maximize-build-space/blob/master/action.yml
- run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
docker image prune --all --force
docker builder prune -a
- run: ./hack/free-disk-space.sh
- run: |
docker build --file test/images/nvidia-inference/Dockerfile test/images/nvidia-inference \
--build-arg PYTORCH_BUILD_ENV="MAX_JOBS=$(($(nproc) - 2)) USE_MKLDNN=0 USE_DISTRIBUTED=0 USE_CUDA=0 USE_ROCM=0 USE_CAFFE2=0 USE_QNNPACK=0 USE_NNPACK=0 USE_XNNPACK=0 USE_MPS=0 BUILD_SHARED_LIBS=OFF USE_FLASH_ATTENTION=0 USE_MEM_EFF_ATTENTION=0 BUILD_TEST=0"
Expand Down
23 changes: 23 additions & 0 deletions hack/free-disk-space.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash

set -o nounset
set -o errexit
set -o pipefail

# hack to free up disk space for build
# ref: https://github.com/easimon/maximize-build-space/blob/master/action.yml

# storage before
sudo df -h

sudo rm -rf \
/usr/share/dotnet \
/usr/local/lib/android \
/opt/ghc \
/opt/hostedtoolcache/CodeQL

docker image prune --all --force
docker builder prune -a

# storage after
sudo df -h
Loading