From 73fee3d9bb92205bb99eab4168b0023c0b6863e1 Mon Sep 17 00:00:00 2001 From: Jerry Gong Date: Tue, 3 Dec 2024 15:27:04 -0500 Subject: [PATCH] add Ninja for speeding up compilation --- .circleci/real_config.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.circleci/real_config.yml b/.circleci/real_config.yml index 6b7ee8bed3f..e592fc7089b 100644 --- a/.circleci/real_config.yml +++ b/.circleci/real_config.yml @@ -510,6 +510,7 @@ commands: if [ -n "<>" ]; then for i in <>; do tools/scripts/retry.sh pip install -r $i + done fi - when: @@ -519,14 +520,16 @@ commands: name: Install Nvidia Apex description: "Apex installation needs Cuda 12.1 because Pytorch binaries were compiled by Cuda 12.1." command: | - if ! pip show apex; then - wget https://developer.download.nvidia.com/compute/cuda/12.1.0/local_installers/cuda_12.1.0_530.30.02_linux.run - sudo sh cuda_12.1.0_530.30.02_linux.run --toolkit --silent - nvcc --version - git clone https://github.com/NVIDIA/apex ~/apex - git -C ~/apex checkout tags/24.04.01 - 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" ~/apex + # Ninja speeds up compilation. + if ! pip show ninja; then + pip install ninja fi + wget https://developer.download.nvidia.com/compute/cuda/12.1.0/local_installers/cuda_12.1.0_530.30.02_linux.run + sudo sh cuda_12.1.0_530.30.02_linux.run --toolkit --silent + nvcc --version + git clone https://github.com/NVIDIA/apex ~/apex + git -C ~/apex checkout tags/24.04.01 + 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" ~/apex - save_cache: key: det-python-deps-<>-{{ checksum "/tmp/cachefile" }}