From 63e142cfebf77d5943843b3646a1d379e102e946 Mon Sep 17 00:00:00 2001 From: Logan Adams Date: Mon, 12 Jun 2023 15:27:12 -0700 Subject: [PATCH 1/6] Fix apex installation --- .github/workflows/nv-megatron.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nv-megatron.yml b/.github/workflows/nv-megatron.yml index 01ce6c7980e6..c7f106bd4ed7 100644 --- a/.github/workflows/nv-megatron.yml +++ b/.github/workflows/nv-megatron.yml @@ -41,7 +41,7 @@ jobs: - name: Install apex run: | - pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" git+https://github.com/NVIDIA/apex.git + pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" git+https://github.com/NVIDIA/apex.git - name: Python environment run: | From 627a6cadda02d439a00908aedc55126faf0a0710 Mon Sep 17 00:00:00 2001 From: Logan Adams Date: Mon, 12 Jun 2023 15:48:58 -0700 Subject: [PATCH 2/6] Switch install flag from build-opt to global-opt to fix missing cpp_ext --- .github/workflows/nv-megatron.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nv-megatron.yml b/.github/workflows/nv-megatron.yml index c7f106bd4ed7..1ea1d82f77c5 100644 --- a/.github/workflows/nv-megatron.yml +++ b/.github/workflows/nv-megatron.yml @@ -41,7 +41,7 @@ jobs: - name: Install apex run: | - pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" git+https://github.com/NVIDIA/apex.git + pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --global-option="--cpp_ext" --global-option="--cuda_ext" git+https://github.com/NVIDIA/apex.git - name: Python environment run: | From 807ccfdf92fe94281d9054ecff0ba0c72f87eb80 Mon Sep 17 00:00:00 2001 From: Logan Adams Date: Mon, 12 Jun 2023 16:34:17 -0700 Subject: [PATCH 3/6] Try installing with support for newer pip --- .github/workflows/nv-megatron.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nv-megatron.yml b/.github/workflows/nv-megatron.yml index 1ea1d82f77c5..6b1f63ded7e3 100644 --- a/.github/workflows/nv-megatron.yml +++ b/.github/workflows/nv-megatron.yml @@ -41,7 +41,10 @@ jobs: - name: Install apex run: | - pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --global-option="--cpp_ext" --global-option="--cuda_ext" git+https://github.com/NVIDIA/apex.git + git clone https://github.com/NVIDIA/apex + cd apex + # if pip >= 23.1 (ref: https://pip.pypa.io/en/stable/news/#v23-1) which supports multiple `--config-settings` with the same key... + pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" ./ - name: Python environment run: | From e53e9012ad2ac6485202b4a8874b4c6406093938 Mon Sep 17 00:00:00 2001 From: Logan Adams Date: Mon, 12 Jun 2023 16:48:31 -0700 Subject: [PATCH 4/6] Add build packaging --- .github/workflows/nv-megatron.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/nv-megatron.yml b/.github/workflows/nv-megatron.yml index 6b1f63ded7e3..17f7a6e10f18 100644 --- a/.github/workflows/nv-megatron.yml +++ b/.github/workflows/nv-megatron.yml @@ -41,10 +41,8 @@ jobs: - name: Install apex run: | - git clone https://github.com/NVIDIA/apex - cd apex - # if pip >= 23.1 (ref: https://pip.pypa.io/en/stable/news/#v23-1) which supports multiple `--config-settings` with the same key... - pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" ./ + pip install packaging + pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" git+https://github.com/NVIDIA/apex.git - name: Python environment run: | From b6d5166c21acb2be3a4d5f7715cca9de5b2035b2 Mon Sep 17 00:00:00 2001 From: Logan Adams Date: Mon, 12 Jun 2023 16:56:32 -0700 Subject: [PATCH 5/6] Update to latest --- .github/workflows/nv-megatron.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/nv-megatron.yml b/.github/workflows/nv-megatron.yml index 17f7a6e10f18..c7f106bd4ed7 100644 --- a/.github/workflows/nv-megatron.yml +++ b/.github/workflows/nv-megatron.yml @@ -41,8 +41,7 @@ jobs: - name: Install apex run: | - pip install packaging - pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" git+https://github.com/NVIDIA/apex.git + pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" git+https://github.com/NVIDIA/apex.git - name: Python environment run: | From 8bc09173e16d8b8d98e16d33c84462c949c45a61 Mon Sep 17 00:00:00 2001 From: Logan Adams Date: Tue, 13 Jun 2023 07:31:43 -0700 Subject: [PATCH 6/6] Pin to specific commit while pyproject.toml is fixed --- .github/workflows/nv-megatron.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nv-megatron.yml b/.github/workflows/nv-megatron.yml index c7f106bd4ed7..d16897f1cea2 100644 --- a/.github/workflows/nv-megatron.yml +++ b/.github/workflows/nv-megatron.yml @@ -41,7 +41,8 @@ jobs: - name: Install apex run: | - pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" git+https://github.com/NVIDIA/apex.git + # Install 82ee367 specifically before pyproject.toml changes due to incomplete dependencies causing errors. + pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" git+https://github.com/NVIDIA/apex.git@82ee367 - name: Python environment run: |