From 53e193e2c2d5f5a4e89f630e92150028b6e4b669 Mon Sep 17 00:00:00 2001 From: leasunhy Date: Sun, 23 Jun 2024 16:35:15 +0000 Subject: [PATCH] fix docker build --- .github/workflows/docker_rdma.yml | 23 +++++++++++++++++++++- .github/workflows/docker_rdma_latest.yml | 25 ++++++++++++++++++++++-- docker/rdma/Dockerfile | 4 ++-- 3 files changed, 47 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker_rdma.yml b/.github/workflows/docker_rdma.yml index d08db5c..6c03cad 100644 --- a/.github/workflows/docker_rdma.yml +++ b/.github/workflows/docker_rdma.yml @@ -25,7 +25,28 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push cu117 with rdma + name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + # this might remove tools that are actually needed, + # if set to "true" but frees about 6 GB + tool-cache: false + + # all of these default to true, but feel free to set to + # "false" if necessary for your workflow + android: true + dotnet: true + haskell: true + large-packages: true + docker-images: false + swap-storage: false + - + name: Set up swap space + uses: pierotofy/set-swap-space@v1.0 + with: + swap-size-gb: 10 + - + name: Build and push with rdma (nightly) uses: docker/build-push-action@v3 with: context: ./docker/rdma/ diff --git a/.github/workflows/docker_rdma_latest.yml b/.github/workflows/docker_rdma_latest.yml index 16481f2..ff01a49 100644 --- a/.github/workflows/docker_rdma_latest.yml +++ b/.github/workflows/docker_rdma_latest.yml @@ -8,7 +8,7 @@ on: jobs: docker: - runs-on: self-hosted + runs-on: ubuntu-latest steps: - name: Checkout @@ -26,7 +26,28 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push cu12.4 with rdma + name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + # this might remove tools that are actually needed, + # if set to "true" but frees about 6 GB + tool-cache: false + + # all of these default to true, but feel free to set to + # "false" if necessary for your workflow + android: true + dotnet: true + haskell: true + large-packages: true + docker-images: false + swap-storage: false + - + name: Set up swap space + uses: pierotofy/set-swap-space@v1.0 + with: + swap-size-gb: 10 + - + name: Build and push with rdma (nightly) uses: docker/build-push-action@v3 with: context: ./docker/rdma/ diff --git a/docker/rdma/Dockerfile b/docker/rdma/Dockerfile index 32e0896..0cf248b 100644 --- a/docker/rdma/Dockerfile +++ b/docker/rdma/Dockerfile @@ -56,7 +56,7 @@ RUN APT_INSTALL="apt-get install -y --no-install-recommends" && \ # # ------------------------------------------------------------------ ENV TORCH_CUDA_ARCH_LIST "7.0;7.5;8.0;9.0" -RUN pip3 install --upgrade sentry-sdk requests +RUN pip3 install --no-cache-dir --upgrade sentry-sdk requests ninja typing packaging && rm -rf ~/.cache/pip RUN cd /tmp && \ git clone https://github.com/dptech-corp/Uni-Core && \ @@ -66,7 +66,7 @@ RUN cd /tmp && \ RUN pip3 install --no-cache-dir tokenizers lmdb biopython ml-collections timeout-decorator urllib3 tree dm-tree && rm -rf ~/.cache/pip -RUN MAX_JOBS=4 pip3 install -U 'flash-attn<2.5.0' --no-build-isolation --no-cache-dir +RUN MAX_JOBS=1 pip3 install -U 'flash-attn<2.5.0' --no-build-isolation --no-cache-dir RUN ldconfig && \ apt-get clean && \