From aa5da48a3b0547d2b696f8068682e816febb4298 Mon Sep 17 00:00:00 2001 From: aclegg3 Date: Tue, 2 Jul 2024 14:52:09 -0700 Subject: [PATCH 01/85] add github actions and workflows test for basic setup, linting, and install --- .../actions/install_ubuntu_deps/action.yml | 39 ++++++++++ .github/workflows/install_and_test.yml | 73 +++++++++++++++++++ 2 files changed, 112 insertions(+) create mode 100644 .github/actions/install_ubuntu_deps/action.yml create mode 100644 .github/workflows/install_and_test.yml diff --git a/.github/actions/install_ubuntu_deps/action.yml b/.github/actions/install_ubuntu_deps/action.yml new file mode 100644 index 0000000000..aa7c44df75 --- /dev/null +++ b/.github/actions/install_ubuntu_deps/action.yml @@ -0,0 +1,39 @@ +name: install_all_ubuntu_deps +runs: + using: composite + steps: + - name: Install dependencies + run: |- + echo "Install dependencies" + sudo apt-get update || true + #TODO: apt-get steps + shell: bash + - name: Install cuda + run: |- + echo "Install cuda" + wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb + sudo dpkg -i cuda-keyring_1.1-1_all.deb + sudo apt-get update + sudo apt-get -y install cuda-toolkit-12-3 + touch ~/cuda_installed + if command -v nvidia-smi; then nvidia-smi; fi + shell: bash + - name: Setup miniconda + uses: conda-incubator/setup-miniconda@v3.0.1 + with: + miniconda-version: "latest" + python-version: "3.9" + activate-environment: "habitat" + - name: Install conda and dependencies + run: |- + echo "Install conda and dependencies" + conda install -y pytorch==1.12.1 torchvision==0.13.1 -c pytorch -c nvidia + conda install -y -c conda-forge ninja numpy pytest pytest-cov ccache hypothesis pytest-mock + pip install pytest-sugar pytest-xdist pytest-benchmark opencv-python cython mock + shell: bash -el {0} + - name: Validate Pytorch Installation + run: |- + echo "Validate Pytorch Installation" + # Check that pytorch is installed with CUDA. + python -c 'import torch; torch.cuda.set_device(0)' + shell: bash -el {0} diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml new file mode 100644 index 0000000000..5be153199d --- /dev/null +++ b/.github/workflows/install_and_test.yml @@ -0,0 +1,73 @@ +name: Install and test +on: + pull_request: {} + push: + branches: + - main + +jobs: + python_lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.1 + - name: Setup python + uses: actions/setup-python@v5.0.0 + with: + python-version: '3.9.16' + - name: setup + run: |- + pip install -U pip + pip install -U --prefer-binary \ + black==23.1.0 \ + flake8 \ + flake8-bugbear==22.6.22 \ + flake8-builtins \ + flake8-comprehensions \ + flake8-return \ + flake8-simplify \ + hypothesis==6.29.3 \ + isort==5.12.0 \ + mypy \ + numpy \ + pytest \ + sphinx \ + tqdm + pip install --prefer-binary -r requirements.txt torch --progress-bar off + - name: run black + run: |- + black --version + black --exclude '/(\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|_build|buck-out|build|dist)|examples/tutorials/(notebooks|nb_python)' src_python/habitat_sim/. examples/. tests/. setup.py --diff + black --exclude '/(\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|_build|buck-out|build|dist)|examples/tutorials/(notebooks|nb_python)' src_python/habitat_sim/. examples/. tests/. setup.py --check + - name: run isort + run: |- + isort --version + isort src_python/habitat_sim/. examples/. tests/. setup.py --diff + isort src_python/habitat_sim/. examples/. tests/. setup.py --check-only + - name: run flake8 + run: |- + flake8 --version + flake8 src_python/habitat_sim/. examples/. tests/. setup.py + - name: run mypy + run: mypy + + install_and_test_ubuntu: + runs-on: 4-core-ubuntu-gpu-t4 + env: + FPS_THRESHOLD: 900 + defaults: + run: + shell: bash -el {0} + steps: + - uses: actions/checkout@v4.1.1 + with: + path: "./habitat-sim" + - name: CPU info + run: cat /proc/cpuinfo + - uses: "./habitat-sim/.github/actions/install_ubuntu_deps" + - name: Build, install habitat-sim + run: |- + cd habitat-sim + pip install -r requirements.txt --progress-bar off + pip install imageio imageio-ffmpeg + git submodule update --init --recursive --jobs 8 + python -u setup.py install --build-type "Release" --lto --headless --bullet From 3ceaeb0144bbd65f268ea794446c4c91382c4b8e Mon Sep 17 00:00:00 2001 From: aclegg3 Date: Wed, 3 Jul 2024 07:54:38 -0700 Subject: [PATCH 02/85] add cmake install --- .github/actions/install_ubuntu_deps/action.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/actions/install_ubuntu_deps/action.yml b/.github/actions/install_ubuntu_deps/action.yml index aa7c44df75..3444b9d3c4 100644 --- a/.github/actions/install_ubuntu_deps/action.yml +++ b/.github/actions/install_ubuntu_deps/action.yml @@ -2,6 +2,20 @@ name: install_all_ubuntu_deps runs: using: composite steps: + - name: install cmake + # OpenEXR requires CMake 3.12. We also download CMake 3.20, which + # we'll use later for the JS build only. + run: | + echo $(date +%F) > ./date + echo $(git ls-remote https://github.com/facebookresearch/habitat-lab.git HEAD | awk '{ print $1}') > ./hablab_sha + cat ./hablab_sha + wget https://cmake.org/files/v3.12/cmake-3.12.4-Linux-x86_64.sh + wget https://cmake.org/files/v3.20/cmake-3.20.1-linux-x86_64.sh + sudo mkdir /opt/cmake312 + sudo mkdir /opt/cmake320 + sudo sh ./cmake-3.12.4-Linux-x86_64.sh --prefix=/opt/cmake312 --skip-license + sudo sh ./cmake-3.20.1-linux-x86_64.sh --prefix=/opt/cmake320 --skip-license + sudo ln -s /opt/cmake312/bin/cmake /usr/local/bin/cmake - name: Install dependencies run: |- echo "Install dependencies" From 99510887c6561db72f2168fbc9876183e05ef082 Mon Sep 17 00:00:00 2001 From: aclegg3 Date: Wed, 3 Jul 2024 08:05:08 -0700 Subject: [PATCH 03/85] add shell for cmake build --- .github/actions/install_ubuntu_deps/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/install_ubuntu_deps/action.yml b/.github/actions/install_ubuntu_deps/action.yml index 3444b9d3c4..e848f4ffbe 100644 --- a/.github/actions/install_ubuntu_deps/action.yml +++ b/.github/actions/install_ubuntu_deps/action.yml @@ -16,6 +16,7 @@ runs: sudo sh ./cmake-3.12.4-Linux-x86_64.sh --prefix=/opt/cmake312 --skip-license sudo sh ./cmake-3.20.1-linux-x86_64.sh --prefix=/opt/cmake320 --skip-license sudo ln -s /opt/cmake312/bin/cmake /usr/local/bin/cmake + shell: bash - name: Install dependencies run: |- echo "Install dependencies" From 0f39852be9b474c38a175a511a1ef761550b4012 Mon Sep 17 00:00:00 2001 From: aclegg3 Date: Wed, 3 Jul 2024 08:33:55 -0700 Subject: [PATCH 04/85] add ssh debug --- .github/workflows/install_and_test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 5be153199d..b0bd2f17bd 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -64,6 +64,8 @@ jobs: - name: CPU info run: cat /proc/cpuinfo - uses: "./habitat-sim/.github/actions/install_ubuntu_deps" + - name: Debugging with tmate + uses: mxschmitt/action-tmate@v3.18 - name: Build, install habitat-sim run: |- cd habitat-sim From c7b01b8dc235052356ec13c671be1d07507651b9 Mon Sep 17 00:00:00 2001 From: aclegg3 Date: Wed, 3 Jul 2024 08:38:09 -0700 Subject: [PATCH 05/85] try sudo --- .github/workflows/install_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index b0bd2f17bd..3eb801c0d3 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -72,4 +72,4 @@ jobs: pip install -r requirements.txt --progress-bar off pip install imageio imageio-ffmpeg git submodule update --init --recursive --jobs 8 - python -u setup.py install --build-type "Release" --lto --headless --bullet + sudo python -u setup.py install --build-type "Release" --lto --headless --bullet From bda25cb9666e646be8ffe8a2bffc6e6dbf005cd1 Mon Sep 17 00:00:00 2001 From: aclegg3 Date: Wed, 3 Jul 2024 09:52:21 -0700 Subject: [PATCH 06/85] add dependency installs and adjust python bin path --- .../actions/install_ubuntu_deps/action.yml | 20 ++++++++++++++++++- .github/workflows/install_and_test.yml | 3 +-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/actions/install_ubuntu_deps/action.yml b/.github/actions/install_ubuntu_deps/action.yml index e848f4ffbe..f52ddaff66 100644 --- a/.github/actions/install_ubuntu_deps/action.yml +++ b/.github/actions/install_ubuntu_deps/action.yml @@ -21,7 +21,25 @@ runs: run: |- echo "Install dependencies" sudo apt-get update || true - #TODO: apt-get steps + sudo apt-get install -y --no-install-recommends \ + build-essential \ + git \ + curl \ + vim \ + ca-certificates \ + libjpeg-dev \ + libglm-dev \ + libegl1-mesa-dev \ + ninja-build \ + xorg-dev \ + freeglut3-dev \ + pkg-config \ + wget \ + zip \ + lcov\ + libhdf5-dev \ + libomp-dev \ + unzip || true shell: bash - name: Install cuda run: |- diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 3eb801c0d3..582c8cfca9 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -70,6 +70,5 @@ jobs: run: |- cd habitat-sim pip install -r requirements.txt --progress-bar off - pip install imageio imageio-ffmpeg git submodule update --init --recursive --jobs 8 - sudo python -u setup.py install --build-type "Release" --lto --headless --bullet + sudo ~/miniconda3/envs/habitat/bin/python -u setup.py install --build-type "Release" --lto --headless --bullet From ec0152fb18ca026c9884676eeb952a79c7edfecc Mon Sep 17 00:00:00 2001 From: aclegg3 Date: Wed, 3 Jul 2024 11:26:41 -0700 Subject: [PATCH 07/85] try activating conda env correctly --- .github/workflows/install_and_test.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 582c8cfca9..5d436db504 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -64,11 +64,15 @@ jobs: - name: CPU info run: cat /proc/cpuinfo - uses: "./habitat-sim/.github/actions/install_ubuntu_deps" - - name: Debugging with tmate - uses: mxschmitt/action-tmate@v3.18 - name: Build, install habitat-sim run: |- + export PATH=$HOME/miniconda/bin:$PATH + conda init + source ~/.bashrc + conda activate habitat cd habitat-sim pip install -r requirements.txt --progress-bar off git submodule update --init --recursive --jobs 8 sudo ~/miniconda3/envs/habitat/bin/python -u setup.py install --build-type "Release" --lto --headless --bullet + - name: Debugging with tmate + uses: mxschmitt/action-tmate@v3.18 From 67b4e14dfc254277edc99c17b0df459116858a10 Mon Sep 17 00:00:00 2001 From: aclegg3 Date: Wed, 3 Jul 2024 14:42:18 -0700 Subject: [PATCH 08/85] try changing the permissions and not building with sudo --- .github/actions/install_ubuntu_deps/action.yml | 1 + .github/workflows/install_and_test.yml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/actions/install_ubuntu_deps/action.yml b/.github/actions/install_ubuntu_deps/action.yml index f52ddaff66..70861ffccd 100644 --- a/.github/actions/install_ubuntu_deps/action.yml +++ b/.github/actions/install_ubuntu_deps/action.yml @@ -16,6 +16,7 @@ runs: sudo sh ./cmake-3.12.4-Linux-x86_64.sh --prefix=/opt/cmake312 --skip-license sudo sh ./cmake-3.20.1-linux-x86_64.sh --prefix=/opt/cmake320 --skip-license sudo ln -s /opt/cmake312/bin/cmake /usr/local/bin/cmake + cmake --version shell: bash - name: Install dependencies run: |- diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 5d436db504..3272a7c64e 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -66,6 +66,7 @@ jobs: - uses: "./habitat-sim/.github/actions/install_ubuntu_deps" - name: Build, install habitat-sim run: |- + sudo chmod -R 777 / export PATH=$HOME/miniconda/bin:$PATH conda init source ~/.bashrc @@ -73,6 +74,6 @@ jobs: cd habitat-sim pip install -r requirements.txt --progress-bar off git submodule update --init --recursive --jobs 8 - sudo ~/miniconda3/envs/habitat/bin/python -u setup.py install --build-type "Release" --lto --headless --bullet + ~/miniconda3/envs/habitat/bin/python -u setup.py install --build-type "Release" --lto --headless --bullet - name: Debugging with tmate uses: mxschmitt/action-tmate@v3.18 From c67695a0f8c52f726a49fffc9d357c84004d5819 Mon Sep 17 00:00:00 2001 From: aclegg3 Date: Wed, 3 Jul 2024 14:50:32 -0700 Subject: [PATCH 09/85] refresh PATH to find cmake? --- .github/actions/install_ubuntu_deps/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/install_ubuntu_deps/action.yml b/.github/actions/install_ubuntu_deps/action.yml index 70861ffccd..7ae3400b44 100644 --- a/.github/actions/install_ubuntu_deps/action.yml +++ b/.github/actions/install_ubuntu_deps/action.yml @@ -16,6 +16,7 @@ runs: sudo sh ./cmake-3.12.4-Linux-x86_64.sh --prefix=/opt/cmake312 --skip-license sudo sh ./cmake-3.20.1-linux-x86_64.sh --prefix=/opt/cmake320 --skip-license sudo ln -s /opt/cmake312/bin/cmake /usr/local/bin/cmake + . ~/.bashrc cmake --version shell: bash - name: Install dependencies From 7adb2a3d0c5b2582116324d2abb5c118cd19a644 Mon Sep 17 00:00:00 2001 From: aclegg3 Date: Wed, 3 Jul 2024 15:04:10 -0700 Subject: [PATCH 10/85] more details --- .github/actions/install_ubuntu_deps/action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/actions/install_ubuntu_deps/action.yml b/.github/actions/install_ubuntu_deps/action.yml index 7ae3400b44..52a125a764 100644 --- a/.github/actions/install_ubuntu_deps/action.yml +++ b/.github/actions/install_ubuntu_deps/action.yml @@ -17,6 +17,9 @@ runs: sudo sh ./cmake-3.20.1-linux-x86_64.sh --prefix=/opt/cmake320 --skip-license sudo ln -s /opt/cmake312/bin/cmake /usr/local/bin/cmake . ~/.bashrc + echo ls -la /usr/local/bin/cmake + echo ls -la /usr/local/bin/ + echo ls -la /opt cmake --version shell: bash - name: Install dependencies From db96b4874618df333c39213d563c1b899d5811a2 Mon Sep 17 00:00:00 2001 From: aclegg3 Date: Wed, 3 Jul 2024 15:06:52 -0700 Subject: [PATCH 11/85] try again --- .github/actions/install_ubuntu_deps/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/install_ubuntu_deps/action.yml b/.github/actions/install_ubuntu_deps/action.yml index 52a125a764..ba6b1d58d1 100644 --- a/.github/actions/install_ubuntu_deps/action.yml +++ b/.github/actions/install_ubuntu_deps/action.yml @@ -17,9 +17,9 @@ runs: sudo sh ./cmake-3.20.1-linux-x86_64.sh --prefix=/opt/cmake320 --skip-license sudo ln -s /opt/cmake312/bin/cmake /usr/local/bin/cmake . ~/.bashrc - echo ls -la /usr/local/bin/cmake - echo ls -la /usr/local/bin/ - echo ls -la /opt + ls -la /usr/local/bin/cmake + ls -la /usr/local/bin/ + ls -la /opt cmake --version shell: bash - name: Install dependencies From d006968b44bd0d51cb6e872c7e14b0aacbfb1502 Mon Sep 17 00:00:00 2001 From: aclegg3 Date: Wed, 3 Jul 2024 15:17:26 -0700 Subject: [PATCH 12/85] try opening permissions to /usr/local/bin --- .github/actions/install_ubuntu_deps/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/install_ubuntu_deps/action.yml b/.github/actions/install_ubuntu_deps/action.yml index ba6b1d58d1..ff3488369c 100644 --- a/.github/actions/install_ubuntu_deps/action.yml +++ b/.github/actions/install_ubuntu_deps/action.yml @@ -16,6 +16,7 @@ runs: sudo sh ./cmake-3.12.4-Linux-x86_64.sh --prefix=/opt/cmake312 --skip-license sudo sh ./cmake-3.20.1-linux-x86_64.sh --prefix=/opt/cmake320 --skip-license sudo ln -s /opt/cmake312/bin/cmake /usr/local/bin/cmake + sudo chmod -R a+rwX /usr/ . ~/.bashrc ls -la /usr/local/bin/cmake ls -la /usr/local/bin/ From 282ba8d7726876c652e6e0f5c531a6f021b01bd1 Mon Sep 17 00:00:00 2001 From: aclegg3 Date: Wed, 10 Jul 2024 08:30:21 -0700 Subject: [PATCH 13/85] open ssh again --- .github/workflows/install_and_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 3272a7c64e..9626a117d4 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -64,6 +64,8 @@ jobs: - name: CPU info run: cat /proc/cpuinfo - uses: "./habitat-sim/.github/actions/install_ubuntu_deps" + - name: Debugging with tmate + uses: mxschmitt/action-tmate@v3.18 - name: Build, install habitat-sim run: |- sudo chmod -R 777 / @@ -75,5 +77,3 @@ jobs: pip install -r requirements.txt --progress-bar off git submodule update --init --recursive --jobs 8 ~/miniconda3/envs/habitat/bin/python -u setup.py install --build-type "Release" --lto --headless --bullet - - name: Debugging with tmate - uses: mxschmitt/action-tmate@v3.18 From 79626d9b83561b6e52f676566796dd6825671796 Mon Sep 17 00:00:00 2001 From: aclegg3 Date: Wed, 10 Jul 2024 08:56:19 -0700 Subject: [PATCH 14/85] remove failing cmake call --- .github/actions/install_ubuntu_deps/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/install_ubuntu_deps/action.yml b/.github/actions/install_ubuntu_deps/action.yml index ff3488369c..455d2fca51 100644 --- a/.github/actions/install_ubuntu_deps/action.yml +++ b/.github/actions/install_ubuntu_deps/action.yml @@ -1,4 +1,4 @@ -name: install_all_ubuntu_deps +name: install_ubuntu_deps runs: using: composite steps: @@ -21,7 +21,7 @@ runs: ls -la /usr/local/bin/cmake ls -la /usr/local/bin/ ls -la /opt - cmake --version + #cmake --version shell: bash - name: Install dependencies run: |- From e87bee2edbedbdb552d94ea7fb7291a9c61763da Mon Sep 17 00:00:00 2001 From: aclegg3 Date: Wed, 10 Jul 2024 09:10:20 -0700 Subject: [PATCH 15/85] changing permissions broke sudo --- .github/actions/install_ubuntu_deps/action.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/actions/install_ubuntu_deps/action.yml b/.github/actions/install_ubuntu_deps/action.yml index 455d2fca51..be7bb8c1e1 100644 --- a/.github/actions/install_ubuntu_deps/action.yml +++ b/.github/actions/install_ubuntu_deps/action.yml @@ -16,12 +16,6 @@ runs: sudo sh ./cmake-3.12.4-Linux-x86_64.sh --prefix=/opt/cmake312 --skip-license sudo sh ./cmake-3.20.1-linux-x86_64.sh --prefix=/opt/cmake320 --skip-license sudo ln -s /opt/cmake312/bin/cmake /usr/local/bin/cmake - sudo chmod -R a+rwX /usr/ - . ~/.bashrc - ls -la /usr/local/bin/cmake - ls -la /usr/local/bin/ - ls -la /opt - #cmake --version shell: bash - name: Install dependencies run: |- From 5f92e90192d70695e5694737a2348da10adb1329 Mon Sep 17 00:00:00 2001 From: aclegg3 Date: Wed, 10 Jul 2024 10:40:21 -0700 Subject: [PATCH 16/85] fix build process and download test data before ssh --- .github/workflows/install_and_test.yml | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 9626a117d4..9becd01434 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -64,16 +64,34 @@ jobs: - name: CPU info run: cat /proc/cpuinfo - uses: "./habitat-sim/.github/actions/install_ubuntu_deps" - - name: Debugging with tmate - uses: mxschmitt/action-tmate@v3.18 - name: Build, install habitat-sim run: |- - sudo chmod -R 777 / + #give cmake ownership to the runner for installation + sudo chown runner /opt/cmake312/bin/cmake + #activate conda env export PATH=$HOME/miniconda/bin:$PATH conda init source ~/.bashrc conda activate habitat + #install habitat-sim cd habitat-sim pip install -r requirements.txt --progress-bar off git submodule update --init --recursive --jobs 8 - ~/miniconda3/envs/habitat/bin/python -u setup.py install --build-type "Release" --lto --headless --bullet + python -u setup.py install --build-type "Release" --lto --headless --bullet + - name: Download test data + run: |- + # Disable clone protection for git lfs + export GIT_CLONE_PROTECTION_ACTIVE=false + + sudo apt install git-lfs + git --version + git-lfs --version + export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH + . activate habitat + conda install -y gitpython git-lfs + cd habitat-sim + git lfs install + python src_python/habitat_sim/utils/datasets_download.py --uids ci_test_assets ycb rearrange_dataset_v2 --replace --data-path data/ --no-prune + ls -la data/scene_datasets/habitat-test-scenes/ + - name: Debugging with tmate + uses: mxschmitt/action-tmate@v3.18 From 50dc339ada1fe58884358b66c418502cd48d2eac Mon Sep 17 00:00:00 2001 From: aclegg3 Date: Wed, 10 Jul 2024 10:59:00 -0700 Subject: [PATCH 17/85] move ssh back up --- .github/workflows/install_and_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 9becd01434..5d83c22623 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -64,6 +64,8 @@ jobs: - name: CPU info run: cat /proc/cpuinfo - uses: "./habitat-sim/.github/actions/install_ubuntu_deps" + - name: Debugging with tmate + uses: mxschmitt/action-tmate@v3.18 - name: Build, install habitat-sim run: |- #give cmake ownership to the runner for installation @@ -93,5 +95,3 @@ jobs: git lfs install python src_python/habitat_sim/utils/datasets_download.py --uids ci_test_assets ycb rearrange_dataset_v2 --replace --data-path data/ --no-prune ls -la data/scene_datasets/habitat-test-scenes/ - - name: Debugging with tmate - uses: mxschmitt/action-tmate@v3.18 From f75814933d55f1327d4e6718139037dc75bc0ecf Mon Sep 17 00:00:00 2001 From: aclegg3 Date: Wed, 10 Jul 2024 11:14:07 -0700 Subject: [PATCH 18/85] reset owner recursively for cmake dir --- .github/workflows/install_and_test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 5d83c22623..1d673957f8 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -64,12 +64,10 @@ jobs: - name: CPU info run: cat /proc/cpuinfo - uses: "./habitat-sim/.github/actions/install_ubuntu_deps" - - name: Debugging with tmate - uses: mxschmitt/action-tmate@v3.18 - name: Build, install habitat-sim run: |- #give cmake ownership to the runner for installation - sudo chown runner /opt/cmake312/bin/cmake + sudo chown runner -R /opt/cmake312/ #activate conda env export PATH=$HOME/miniconda/bin:$PATH conda init @@ -95,3 +93,5 @@ jobs: git lfs install python src_python/habitat_sim/utils/datasets_download.py --uids ci_test_assets ycb rearrange_dataset_v2 --replace --data-path data/ --no-prune ls -la data/scene_datasets/habitat-test-scenes/ + - name: Debugging with tmate + uses: mxschmitt/action-tmate@v3.18 From 4e0e20d9c0c3a43f29e2f61bc2827f686f154192 Mon Sep 17 00:00:00 2001 From: aclegg3 Date: Wed, 10 Jul 2024 11:38:13 -0700 Subject: [PATCH 19/85] setup conda env activation uniformly --- .github/workflows/install_and_test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 1d673957f8..898f31085f 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -69,7 +69,7 @@ jobs: #give cmake ownership to the runner for installation sudo chown runner -R /opt/cmake312/ #activate conda env - export PATH=$HOME/miniconda/bin:$PATH + export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH conda init source ~/.bashrc conda activate habitat @@ -87,7 +87,9 @@ jobs: git --version git-lfs --version export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH - . activate habitat + conda init + source ~/.bashrc + conda activate habitat conda install -y gitpython git-lfs cd habitat-sim git lfs install From 79545f207e85630d849e6b9a9d59280a7d866f44 Mon Sep 17 00:00:00 2001 From: Mikael Dallaire Cote <110583667+0mdc@users.noreply.github.com> Date: Mon, 18 Nov 2024 13:17:11 -0500 Subject: [PATCH 20/85] Include Ubuntu NVIDIA dependencies to CI. --- .../actions/install_ubuntu_gpu_deps/action.yml | 16 ++++++++++++++++ .github/workflows/install_and_test.yml | 1 + 2 files changed, 17 insertions(+) create mode 100644 .github/actions/install_ubuntu_gpu_deps/action.yml diff --git a/.github/actions/install_ubuntu_gpu_deps/action.yml b/.github/actions/install_ubuntu_gpu_deps/action.yml new file mode 100644 index 0000000000..3f780ff40c --- /dev/null +++ b/.github/actions/install_ubuntu_gpu_deps/action.yml @@ -0,0 +1,16 @@ +# This action installs required Ubuntu NVIDIA dependencies. +# It assumes that `nvidia-smi` is available on the system. +name: "Install GPU Dependencies" +runs: + using: composite + steps: + - name: Install GPU Dependencies + shell: bash + run: | + NVIDIA_SMI_OUTPUT=$(nvidia-smi) + FULL_DRIVER_VERSION=$(echo "$NVIDIA_SMI_OUTPUT" | grep -oP 'Driver Version:\s+\K[\d.]+') + MAJOR_DRIVER_VERSION=$(echo "$NVIDIA_SMI_OUTPUT" | grep -oP 'Driver Version:\s+\K\d+') + UBUNTU_PACKAGE_SUFFIX="${MAJOR_DRIVER_VERSION}=${FULL_DRIVER_VERSION}-0ubuntu1" + sudo apt-get update + sudo apt-get install -y libnvidia-common-${UBUNTU_PACKAGE_SUFFIX} + sudo apt-get install -y libnvidia-gl-${UBUNTU_PACKAGE_SUFFIX} diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 898f31085f..dd4ee59f5b 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -64,6 +64,7 @@ jobs: - name: CPU info run: cat /proc/cpuinfo - uses: "./habitat-sim/.github/actions/install_ubuntu_deps" + - uses: "./habitat-sim/.github/actions/install_ubuntu_gpu_deps" - name: Build, install habitat-sim run: |- #give cmake ownership to the runner for installation From 2169f432450228411db3b242c7aa502afa74e1c5 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Mon, 18 Nov 2024 12:25:55 -0800 Subject: [PATCH 21/85] remove JS req cmake20 and move the git-lfs install to the deps installer action --- .github/actions/install_ubuntu_deps/action.yml | 4 +--- .github/workflows/install_and_test.yml | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/actions/install_ubuntu_deps/action.yml b/.github/actions/install_ubuntu_deps/action.yml index be7bb8c1e1..d05ded9086 100644 --- a/.github/actions/install_ubuntu_deps/action.yml +++ b/.github/actions/install_ubuntu_deps/action.yml @@ -10,11 +10,8 @@ runs: echo $(git ls-remote https://github.com/facebookresearch/habitat-lab.git HEAD | awk '{ print $1}') > ./hablab_sha cat ./hablab_sha wget https://cmake.org/files/v3.12/cmake-3.12.4-Linux-x86_64.sh - wget https://cmake.org/files/v3.20/cmake-3.20.1-linux-x86_64.sh sudo mkdir /opt/cmake312 - sudo mkdir /opt/cmake320 sudo sh ./cmake-3.12.4-Linux-x86_64.sh --prefix=/opt/cmake312 --skip-license - sudo sh ./cmake-3.20.1-linux-x86_64.sh --prefix=/opt/cmake320 --skip-license sudo ln -s /opt/cmake312/bin/cmake /usr/local/bin/cmake shell: bash - name: Install dependencies @@ -24,6 +21,7 @@ runs: sudo apt-get install -y --no-install-recommends \ build-essential \ git \ + git-lfs \ curl \ vim \ ca-certificates \ diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index dd4ee59f5b..9a11da5c3a 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -84,7 +84,6 @@ jobs: # Disable clone protection for git lfs export GIT_CLONE_PROTECTION_ACTIVE=false - sudo apt install git-lfs git --version git-lfs --version export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH From f813cf3fcfc583b49620dadbe52472c55d2309c0 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Tue, 19 Nov 2024 07:46:33 -0800 Subject: [PATCH 22/85] add testing to the workflow --- .github/workflows/install_and_test.yml | 34 +++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 9a11da5c3a..12dd0c472b 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -28,7 +28,7 @@ jobs: hypothesis==6.29.3 \ isort==5.12.0 \ mypy \ - numpy \ + numpy==1.26.4 \ pytest \ sphinx \ tqdm @@ -95,5 +95,37 @@ jobs: git lfs install python src_python/habitat_sim/utils/datasets_download.py --uids ci_test_assets ycb rearrange_dataset_v2 --replace --data-path data/ --no-prune ls -la data/scene_datasets/habitat-test-scenes/ + - name: Run sim benchmark + run: |- + export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH + . activate habitat; cd habitat-sim + python examples/example.py --scene data/scene_datasets/habitat-test-scenes/van-gogh-room.glb --silent --test_fps_regression $FPS_THRESHOLD + - name: Run sim tests + run: |- + export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH + . activate habitat; cd habitat-sim + export PYTHONPATH=$(pwd):$PYTHONPATH + + #set pytest to show partial progress + export PYTHONUNBUFFERED=1 + + # run tests with code coverage + CORRADE_TEST_COLOR=ON GTEST_COLOR=yes ./build.sh --headless \ + --bullet \ + --with-cuda \ + --build-datatool \ + --run-tests \ + --no-lto \ + --cmake-args='-DCMAKE_CXX_FLAGS="--coverage"' + PYTHONPATH=src_python pytest -n 4 --durations=10 --cov-report=xml --cov=./ + + #run the marked pytest-benchmark tests and print the results + PYTHONPATH=src_python pytest -m sim_benchmarks + + #re-build without bullet and cuda and run physics tests again + #TODO: instead of reinstall, do this with configuration + ./build.sh --headless --cmake-args='-DCMAKE_CXX_FLAGS="--coverage"' + PYTHONPATH=src_python pytest -n 4 --durations=10 --cov-report=xml --cov=./ --cov-append tests/test_physics.py tests/test_sensors.py + - name: Debugging with tmate uses: mxschmitt/action-tmate@v3.18 From 33333fb1c87e2b74feac67d0d398c86dd4237fae Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Tue, 19 Nov 2024 08:09:04 -0800 Subject: [PATCH 23/85] use correct conda activate style --- .github/workflows/install_and_test.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 12dd0c472b..55f51ee095 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -98,12 +98,18 @@ jobs: - name: Run sim benchmark run: |- export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH - . activate habitat; cd habitat-sim + conda init + source ~/.bashrc + conda activate habitat + cd habitat-sim python examples/example.py --scene data/scene_datasets/habitat-test-scenes/van-gogh-room.glb --silent --test_fps_regression $FPS_THRESHOLD - name: Run sim tests run: |- export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH - . activate habitat; cd habitat-sim + conda init + source ~/.bashrc + conda activate habitat + cd habitat-sim export PYTHONPATH=$(pwd):$PYTHONPATH #set pytest to show partial progress From ab2622f316a1656d8a3684f56993481d5a2edb84 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Tue, 19 Nov 2024 08:57:07 -0800 Subject: [PATCH 24/85] add some tests and try updating smake permissions to clear ctest bug --- .github/workflows/install_and_test.yml | 52 ++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 55f51ee095..c990af0bef 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -105,6 +105,9 @@ jobs: python examples/example.py --scene data/scene_datasets/habitat-test-scenes/van-gogh-room.glb --silent --test_fps_regression $FPS_THRESHOLD - name: Run sim tests run: |- + #give cmake ownership to the runner for installation + sudo chown runner -R /opt/cmake312/ + #activate conda env export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH conda init source ~/.bashrc @@ -132,6 +135,55 @@ jobs: #TODO: instead of reinstall, do this with configuration ./build.sh --headless --cmake-args='-DCMAKE_CXX_FLAGS="--coverage"' PYTHONPATH=src_python pytest -n 4 --durations=10 --cov-report=xml --cov=./ --cov-append tests/test_physics.py tests/test_sensors.py + - name: upload test coverage + run: |- + export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH + conda init + source ~/.bashrc + conda activate habitat + cd habitat-sim + + curl -Os https://uploader.codecov.io/latest/linux/codecov + chmod +x codecov + #Uploading test coverage for Python code + ./codecov -f coverage.xml -cF Python + #Uploading test coverage for C++ code + lcov --directory . --capture --output-file coverage.info + # Replaces -1 linecount with zero to prevent lcov from crashing: + # https://github.com/psycofdj/coverxygen/issues/6 + sed -i -e 's/,-1$/,0/g' coverage.info + #lcov --remove coverage.info "*/deps/*" --output-file coverage.info > /dev/null + #lcov --remove coverage.info "*/test/*" --output-file coverage.info > /dev/null + #lcov --remove coverage.info "*/tests/*" --output-file coverage.info > /dev/null + ./codecov -f coverage.info -cF CPP - name: Debugging with tmate uses: mxschmitt/action-tmate@v3.18 + + install_and_test_ubuntu_audio: + runs-on: 4-core-ubuntu-gpu-t4 + env: + FPS_THRESHOLD: 900 + defaults: + run: + shell: bash -el {0} + steps: + - uses: actions/checkout@v4.1.1 + with: + path: "./habitat-sim" + - name: CPU info + run: cat /proc/cpuinfo + - uses: "./habitat-sim/.github/actions/install_ubuntu_deps" + - uses: "./habitat-sim/.github/actions/install_ubuntu_gpu_deps" + - name: install habitat-sim with audio and run audio_agent script + run: |- + export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH + conda init + source ~/.bashrc + conda activate habitat + cd habitat-sim + pip install -r requirements.txt --progress-bar off + pip install imageio imageio-ffmpeg + git submodule update --init --recursive --jobs 8 + python -u setup.py install --build-type "Release" --lto --headless --audio + python examples/tutorials/audio_agent.py From 1caa62b684c813f1d39db039dd7ffd9e1d48fc27 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Tue, 19 Nov 2024 09:05:51 -0800 Subject: [PATCH 25/85] fix workflow config typo --- .github/workflows/install_and_test.yml | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index c990af0bef..cc81ec9978 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -162,8 +162,6 @@ jobs: install_and_test_ubuntu_audio: runs-on: 4-core-ubuntu-gpu-t4 - env: - FPS_THRESHOLD: 900 defaults: run: shell: bash -el {0} @@ -176,14 +174,14 @@ jobs: - uses: "./habitat-sim/.github/actions/install_ubuntu_deps" - uses: "./habitat-sim/.github/actions/install_ubuntu_gpu_deps" - name: install habitat-sim with audio and run audio_agent script - run: |- - export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH - conda init - source ~/.bashrc - conda activate habitat - cd habitat-sim - pip install -r requirements.txt --progress-bar off - pip install imageio imageio-ffmpeg - git submodule update --init --recursive --jobs 8 - python -u setup.py install --build-type "Release" --lto --headless --audio - python examples/tutorials/audio_agent.py + run: |- + export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH + conda init + source ~/.bashrc + conda activate habitat + cd habitat-sim + pip install -r requirements.txt --progress-bar off + pip install imageio imageio-ffmpeg + git submodule update --init --recursive --jobs 8 + python -u setup.py install --build-type "Release" --lto --headless --audio + python examples/tutorials/audio_agent.py From 36ba584048009044f83e46c4f33c03df33c7d65a Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Tue, 19 Nov 2024 09:50:37 -0800 Subject: [PATCH 26/85] ssh debugging --- .github/workflows/install_and_test.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index cc81ec9978..673a2f8709 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -103,6 +103,8 @@ jobs: conda activate habitat cd habitat-sim python examples/example.py --scene data/scene_datasets/habitat-test-scenes/van-gogh-room.glb --silent --test_fps_regression $FPS_THRESHOLD + - name: Debugging with tmate + uses: mxschmitt/action-tmate@v3.18 - name: Run sim tests run: |- #give cmake ownership to the runner for installation @@ -157,8 +159,7 @@ jobs: #lcov --remove coverage.info "*/test/*" --output-file coverage.info > /dev/null #lcov --remove coverage.info "*/tests/*" --output-file coverage.info > /dev/null ./codecov -f coverage.info -cF CPP - - name: Debugging with tmate - uses: mxschmitt/action-tmate@v3.18 + install_and_test_ubuntu_audio: runs-on: 4-core-ubuntu-gpu-t4 @@ -175,6 +176,8 @@ jobs: - uses: "./habitat-sim/.github/actions/install_ubuntu_gpu_deps" - name: install habitat-sim with audio and run audio_agent script run: |- + #give cmake ownership to the runner for installation + sudo chown runner -R /opt/cmake312/ export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH conda init source ~/.bashrc From 9ad32adb05d3ca768c861b4960af18a472ddc1b0 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Tue, 19 Nov 2024 11:32:29 -0800 Subject: [PATCH 27/85] symblink the ctest binary also --- .github/actions/install_ubuntu_deps/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/install_ubuntu_deps/action.yml b/.github/actions/install_ubuntu_deps/action.yml index d05ded9086..8d9eb3dd24 100644 --- a/.github/actions/install_ubuntu_deps/action.yml +++ b/.github/actions/install_ubuntu_deps/action.yml @@ -13,6 +13,7 @@ runs: sudo mkdir /opt/cmake312 sudo sh ./cmake-3.12.4-Linux-x86_64.sh --prefix=/opt/cmake312 --skip-license sudo ln -s /opt/cmake312/bin/cmake /usr/local/bin/cmake + sudo ln -s /opt/cmake312/bin/ctest /usr/local/bin/ctest shell: bash - name: Install dependencies run: |- From c103a413fc627d7bc8c2b1d9f22bebb7f47972f1 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Tue, 19 Nov 2024 11:33:11 -0800 Subject: [PATCH 28/85] move debugging --- .github/workflows/install_and_test.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 673a2f8709..0f0ebf4b13 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -103,8 +103,6 @@ jobs: conda activate habitat cd habitat-sim python examples/example.py --scene data/scene_datasets/habitat-test-scenes/van-gogh-room.glb --silent --test_fps_regression $FPS_THRESHOLD - - name: Debugging with tmate - uses: mxschmitt/action-tmate@v3.18 - name: Run sim tests run: |- #give cmake ownership to the runner for installation @@ -159,7 +157,8 @@ jobs: #lcov --remove coverage.info "*/test/*" --output-file coverage.info > /dev/null #lcov --remove coverage.info "*/tests/*" --output-file coverage.info > /dev/null ./codecov -f coverage.info -cF CPP - + - name: Debugging with tmate + uses: mxschmitt/action-tmate@v3.18 install_and_test_ubuntu_audio: runs-on: 4-core-ubuntu-gpu-t4 From 6981188ea5e0e3abf058110d8c20ccf0776564c7 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Tue, 19 Nov 2024 12:28:06 -0800 Subject: [PATCH 29/85] remove a broken test and move the audio testing back into the primary process --- .github/workflows/install_and_test.yml | 18 ++---------------- tests/test_configs.py | 5 +++-- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 0f0ebf4b13..97df6c9bc9 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -157,22 +157,6 @@ jobs: #lcov --remove coverage.info "*/test/*" --output-file coverage.info > /dev/null #lcov --remove coverage.info "*/tests/*" --output-file coverage.info > /dev/null ./codecov -f coverage.info -cF CPP - - name: Debugging with tmate - uses: mxschmitt/action-tmate@v3.18 - - install_and_test_ubuntu_audio: - runs-on: 4-core-ubuntu-gpu-t4 - defaults: - run: - shell: bash -el {0} - steps: - - uses: actions/checkout@v4.1.1 - with: - path: "./habitat-sim" - - name: CPU info - run: cat /proc/cpuinfo - - uses: "./habitat-sim/.github/actions/install_ubuntu_deps" - - uses: "./habitat-sim/.github/actions/install_ubuntu_gpu_deps" - name: install habitat-sim with audio and run audio_agent script run: |- #give cmake ownership to the runner for installation @@ -187,3 +171,5 @@ jobs: git submodule update --init --recursive --jobs 8 python -u setup.py install --build-type "Release" --lto --headless --audio python examples/tutorials/audio_agent.py + - name: Debugging with tmate + uses: mxschmitt/action-tmate@v3.18 diff --git a/tests/test_configs.py b/tests/test_configs.py index df6a7a2a9e..26610aeef5 100644 --- a/tests/test_configs.py +++ b/tests/test_configs.py @@ -27,8 +27,9 @@ def test_core_configuration(): assert config.has_value("test") assert config.get("test") == "test statement" - config.remove("test") - assert not config.has_value("test") + # TODO: this line segfaults on some platforms, investigate + # config.remove("test") + # assert not config.has_value("test") config.set("bool", True) assert config.get("bool") == True From a653561d1d92922939320e3819f20fe00ee1b5d6 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Tue, 19 Nov 2024 13:58:23 -0800 Subject: [PATCH 30/85] try pyest without cuda earlier in the process as a sanity check --- .github/workflows/install_and_test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 97df6c9bc9..580d4d4014 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -103,6 +103,11 @@ jobs: conda activate habitat cd habitat-sim python examples/example.py --scene data/scene_datasets/habitat-test-scenes/van-gogh-room.glb --silent --test_fps_regression $FPS_THRESHOLD + #try the basic pytest here + #set pytest to show partial progress + export PYTHONPATH=$(pwd):$PYTHONPATH + export PYTHONUNBUFFERED=1 + PYTHONPATH=src_python pytest -n 4 --durations=10 - name: Run sim tests run: |- #give cmake ownership to the runner for installation From 7e045e1dfe2b56fd211d525b0982f0e72c6e780e Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Tue, 19 Nov 2024 14:29:48 -0800 Subject: [PATCH 31/85] try with different pythonpath --- .github/workflows/install_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 580d4d4014..8fd93f6f43 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -107,7 +107,7 @@ jobs: #set pytest to show partial progress export PYTHONPATH=$(pwd):$PYTHONPATH export PYTHONUNBUFFERED=1 - PYTHONPATH=src_python pytest -n 4 --durations=10 + pytest -n 4 --durations=10 - name: Run sim tests run: |- #give cmake ownership to the runner for installation From 38252bd6d8bcc0d34c77e0f26f91c2c23ae76765 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 09:11:08 -0800 Subject: [PATCH 32/85] debugging --- .github/workflows/install_and_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 8fd93f6f43..e935492793 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -108,6 +108,8 @@ jobs: export PYTHONPATH=$(pwd):$PYTHONPATH export PYTHONUNBUFFERED=1 pytest -n 4 --durations=10 + - name: Debugging with tmate + uses: mxschmitt/action-tmate@v3.18 - name: Run sim tests run: |- #give cmake ownership to the runner for installation @@ -176,5 +178,3 @@ jobs: git submodule update --init --recursive --jobs 8 python -u setup.py install --build-type "Release" --lto --headless --audio python examples/tutorials/audio_agent.py - - name: Debugging with tmate - uses: mxschmitt/action-tmate@v3.18 From e4c54f439f0e6a90d018cf878ef27f1d35ff662c Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 09:54:11 -0800 Subject: [PATCH 33/85] try moving all cuda/gl installation into the action runner and inform versions with nvidia-smi results --- .../actions/install_ubuntu_deps/action.yml | 20 +++++++++---------- .../install_ubuntu_gpu_deps/action.yml | 8 ++++++++ 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/actions/install_ubuntu_deps/action.yml b/.github/actions/install_ubuntu_deps/action.yml index 8d9eb3dd24..34474444c6 100644 --- a/.github/actions/install_ubuntu_deps/action.yml +++ b/.github/actions/install_ubuntu_deps/action.yml @@ -40,16 +40,16 @@ runs: libomp-dev \ unzip || true shell: bash - - name: Install cuda - run: |- - echo "Install cuda" - wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb - sudo dpkg -i cuda-keyring_1.1-1_all.deb - sudo apt-get update - sudo apt-get -y install cuda-toolkit-12-3 - touch ~/cuda_installed - if command -v nvidia-smi; then nvidia-smi; fi - shell: bash + # - name: Install cuda + # run: |- + # echo "Install cuda" + # wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb + # sudo dpkg -i cuda-keyring_1.1-1_all.deb + # sudo apt-get update + # sudo apt-get -y install cuda-toolkit-12-3 + # touch ~/cuda_installed + # if command -v nvidia-smi; then nvidia-smi; fi + # shell: bash - name: Setup miniconda uses: conda-incubator/setup-miniconda@v3.0.1 with: diff --git a/.github/actions/install_ubuntu_gpu_deps/action.yml b/.github/actions/install_ubuntu_gpu_deps/action.yml index 3f780ff40c..3e0eac0aa4 100644 --- a/.github/actions/install_ubuntu_gpu_deps/action.yml +++ b/.github/actions/install_ubuntu_gpu_deps/action.yml @@ -8,9 +8,17 @@ runs: shell: bash run: | NVIDIA_SMI_OUTPUT=$(nvidia-smi) + # Extract CUDA version (e.g., 11.7) + CUDA_VERSION=$(echo "$NVIDIA_SMI_OUTPUT" | grep -oP 'CUDA Version:\s+\K[\d.]+') + FULL_DRIVER_VERSION=$(echo "$NVIDIA_SMI_OUTPUT" | grep -oP 'Driver Version:\s+\K[\d.]+') MAJOR_DRIVER_VERSION=$(echo "$NVIDIA_SMI_OUTPUT" | grep -oP 'Driver Version:\s+\K\d+') UBUNTU_PACKAGE_SUFFIX="${MAJOR_DRIVER_VERSION}=${FULL_DRIVER_VERSION}-0ubuntu1" sudo apt-get update + sudo apt-get install -y cuda-toolkit-${CUDA_VERSION} + sudo apt-get install -y nvidia-gds-${CUDA_VERSION} sudo apt-get install -y libnvidia-common-${UBUNTU_PACKAGE_SUFFIX} sudo apt-get install -y libnvidia-gl-${UBUNTU_PACKAGE_SUFFIX} + sudo apt-get install -y libnvidia-compute-${UBUNTU_PACKAGE_SUFFIX} + sudo apt-get install -y libnvidia-decode-${UBUNTU_PACKAGE_SUFFIX} + sudo apt-get install -y libnvidia-encode-${UBUNTU_PACKAGE_SUFFIX} From 85c3dbd890dfe9ae77938898cbc32426c556e7d9 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 10:53:54 -0800 Subject: [PATCH 34/85] remove debugging prompt to let the tests run --- .github/workflows/install_and_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index e935492793..8fd93f6f43 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -108,8 +108,6 @@ jobs: export PYTHONPATH=$(pwd):$PYTHONPATH export PYTHONUNBUFFERED=1 pytest -n 4 --durations=10 - - name: Debugging with tmate - uses: mxschmitt/action-tmate@v3.18 - name: Run sim tests run: |- #give cmake ownership to the runner for installation @@ -178,3 +176,5 @@ jobs: git submodule update --init --recursive --jobs 8 python -u setup.py install --build-type "Release" --lto --headless --audio python examples/tutorials/audio_agent.py + - name: Debugging with tmate + uses: mxschmitt/action-tmate@v3.18 From 8e5956f784b8d513957c6417af0906aea30e9734 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 13:05:10 -0800 Subject: [PATCH 35/85] add conda binary build test --- .github/workflows/install_and_test.yml | 40 +++++++++++++++++++++----- 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 8fd93f6f43..cfc5093b43 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -103,11 +103,6 @@ jobs: conda activate habitat cd habitat-sim python examples/example.py --scene data/scene_datasets/habitat-test-scenes/van-gogh-room.glb --silent --test_fps_regression $FPS_THRESHOLD - #try the basic pytest here - #set pytest to show partial progress - export PYTHONPATH=$(pwd):$PYTHONPATH - export PYTHONUNBUFFERED=1 - pytest -n 4 --durations=10 - name: Run sim tests run: |- #give cmake ownership to the runner for installation @@ -176,5 +171,36 @@ jobs: git submodule update --init --recursive --jobs 8 python -u setup.py install --build-type "Release" --lto --headless --audio python examples/tutorials/audio_agent.py - - name: Debugging with tmate - uses: mxschmitt/action-tmate@v3.18 + #NOTE: use the below to debug with ssh: simply move this "job" just before the crashing job to intercept the workflow + #- name: Debugging with tmate + # uses: mxschmitt/action-tmate@v3.18 + +build_conda_binaries: + runs-on: 4-core-ubuntu-gpu-t4 + env: + AIHABITAT_CONDA_USERNAME: aihabitat + AIHABITAT_CONDA_PWD: ${{ secrets.AIHABITAT_CONDA_PWD }} + AIHABITAT_NIGHTLY_CONDA_USERNAME: aihabitat-nightly + AIHABITAT_NIGHTLY_CONDA_PWD: ${{ secrets.AIHABITAT_NIGHTLY_CONDA_PWD }} + + defaults: + run: + shell: bash -el {0} + steps: + - uses: actions/checkout@v4.1.1 + with: + path: "./habitat-sim" + - name: Set modality variable + echo "CI_TEST=$(echo ${{ github.event_name }} == 'pull_request'" >> $GITHUB_ENV + - name: Build conda Linux packages + run: |- + cd habitat-sim/conda-build + echo "Current event name: $GITHUB_EVENT_NAME" + echo ${{ env.CI_TEST }} + + #pivot on the build type + if [[ ${{ github.event_name }} == 'pull_request' ]]; then + echo "Conda name: $AIHABITAT_CONDA_USERNAME" + else + echo "Conda name: $AIHABITAT_NIGHTLY_CONDA_USERNAME" + fi From ac6e70f74fbb66f2b1153659ec878b4313f27b9d Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 13:07:12 -0800 Subject: [PATCH 36/85] try without new section to check for yaml error --- .github/workflows/install_and_test.yml | 54 +++++++++++++------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index cfc5093b43..3042ca4fa6 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -175,32 +175,32 @@ jobs: #- name: Debugging with tmate # uses: mxschmitt/action-tmate@v3.18 -build_conda_binaries: - runs-on: 4-core-ubuntu-gpu-t4 - env: - AIHABITAT_CONDA_USERNAME: aihabitat - AIHABITAT_CONDA_PWD: ${{ secrets.AIHABITAT_CONDA_PWD }} - AIHABITAT_NIGHTLY_CONDA_USERNAME: aihabitat-nightly - AIHABITAT_NIGHTLY_CONDA_PWD: ${{ secrets.AIHABITAT_NIGHTLY_CONDA_PWD }} +# build_conda_binaries: +# runs-on: 4-core-ubuntu-gpu-t4 +# env: +# AIHABITAT_CONDA_USERNAME: aihabitat +# AIHABITAT_CONDA_PWD: ${{ secrets.AIHABITAT_CONDA_PWD }} +# AIHABITAT_NIGHTLY_CONDA_USERNAME: aihabitat-nightly +# AIHABITAT_NIGHTLY_CONDA_PWD: ${{ secrets.AIHABITAT_NIGHTLY_CONDA_PWD }} - defaults: - run: - shell: bash -el {0} - steps: - - uses: actions/checkout@v4.1.1 - with: - path: "./habitat-sim" - - name: Set modality variable - echo "CI_TEST=$(echo ${{ github.event_name }} == 'pull_request'" >> $GITHUB_ENV - - name: Build conda Linux packages - run: |- - cd habitat-sim/conda-build - echo "Current event name: $GITHUB_EVENT_NAME" - echo ${{ env.CI_TEST }} +# defaults: +# run: +# shell: bash -el {0} +# steps: +# - uses: actions/checkout@v4.1.1 +# with: +# path: "./habitat-sim" +# - name: Set modality variable +# echo "CI_TEST=$(echo ${{ github.event_name }} == 'pull_request'" >> $GITHUB_ENV +# - name: Build conda Linux packages +# run: |- +# cd habitat-sim/conda-build +# echo "Current event name: $GITHUB_EVENT_NAME" +# echo ${{ env.CI_TEST }} - #pivot on the build type - if [[ ${{ github.event_name }} == 'pull_request' ]]; then - echo "Conda name: $AIHABITAT_CONDA_USERNAME" - else - echo "Conda name: $AIHABITAT_NIGHTLY_CONDA_USERNAME" - fi +# #pivot on the build type +# if [[ ${{ github.event_name }} == 'pull_request' ]]; then +# echo "Conda name: $AIHABITAT_CONDA_USERNAME" +# else +# echo "Conda name: $AIHABITAT_NIGHTLY_CONDA_USERNAME" +# fi From fe51770664b39a66097ed4ba0b73e6d162932503 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 13:08:05 -0800 Subject: [PATCH 37/85] try adding back the obvious --- .github/workflows/install_and_test.yml | 38 +++++++++++++------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 3042ca4fa6..59f4ad168d 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -175,26 +175,26 @@ jobs: #- name: Debugging with tmate # uses: mxschmitt/action-tmate@v3.18 -# build_conda_binaries: -# runs-on: 4-core-ubuntu-gpu-t4 -# env: -# AIHABITAT_CONDA_USERNAME: aihabitat -# AIHABITAT_CONDA_PWD: ${{ secrets.AIHABITAT_CONDA_PWD }} -# AIHABITAT_NIGHTLY_CONDA_USERNAME: aihabitat-nightly -# AIHABITAT_NIGHTLY_CONDA_PWD: ${{ secrets.AIHABITAT_NIGHTLY_CONDA_PWD }} +build_conda_binaries: + runs-on: 4-core-ubuntu-gpu-t4 + env: + AIHABITAT_CONDA_USERNAME: aihabitat + AIHABITAT_CONDA_PWD: ${{ secrets.AIHABITAT_CONDA_PWD }} + AIHABITAT_NIGHTLY_CONDA_USERNAME: aihabitat-nightly + AIHABITAT_NIGHTLY_CONDA_PWD: ${{ secrets.AIHABITAT_NIGHTLY_CONDA_PWD }} -# defaults: -# run: -# shell: bash -el {0} -# steps: -# - uses: actions/checkout@v4.1.1 -# with: -# path: "./habitat-sim" -# - name: Set modality variable -# echo "CI_TEST=$(echo ${{ github.event_name }} == 'pull_request'" >> $GITHUB_ENV -# - name: Build conda Linux packages -# run: |- -# cd habitat-sim/conda-build + defaults: + run: + shell: bash -el {0} + steps: + - uses: actions/checkout@v4.1.1 + with: + path: "./habitat-sim" + #- name: Set modality variable + # echo "CI_TEST=$(echo ${{ github.event_name }} == 'pull_request'" >> $GITHUB_ENV + - name: Build conda Linux packages + run: |- + cd habitat-sim/conda-build # echo "Current event name: $GITHUB_EVENT_NAME" # echo ${{ env.CI_TEST }} From 700b6941388ffc71741196cf7de4907ca118c3c8 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 13:09:12 -0800 Subject: [PATCH 38/85] remove more questionable lines --- .github/workflows/install_and_test.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 59f4ad168d..b7b6d4711b 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -179,10 +179,9 @@ build_conda_binaries: runs-on: 4-core-ubuntu-gpu-t4 env: AIHABITAT_CONDA_USERNAME: aihabitat - AIHABITAT_CONDA_PWD: ${{ secrets.AIHABITAT_CONDA_PWD }} + #AIHABITAT_CONDA_PWD: ${{ secrets.AIHABITAT_CONDA_PWD }} AIHABITAT_NIGHTLY_CONDA_USERNAME: aihabitat-nightly - AIHABITAT_NIGHTLY_CONDA_PWD: ${{ secrets.AIHABITAT_NIGHTLY_CONDA_PWD }} - + #AIHABITAT_NIGHTLY_CONDA_PWD: ${{ secrets.AIHABITAT_NIGHTLY_CONDA_PWD }} defaults: run: shell: bash -el {0} From 8dcff67afe93fc977454449bd9558076c8ca12d1 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 13:10:55 -0800 Subject: [PATCH 39/85] try toy example --- .github/workflows/install_and_test.yml | 28 +++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index b7b6d4711b..7619cbb1f1 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -177,11 +177,6 @@ jobs: build_conda_binaries: runs-on: 4-core-ubuntu-gpu-t4 - env: - AIHABITAT_CONDA_USERNAME: aihabitat - #AIHABITAT_CONDA_PWD: ${{ secrets.AIHABITAT_CONDA_PWD }} - AIHABITAT_NIGHTLY_CONDA_USERNAME: aihabitat-nightly - #AIHABITAT_NIGHTLY_CONDA_PWD: ${{ secrets.AIHABITAT_NIGHTLY_CONDA_PWD }} defaults: run: shell: bash -el {0} @@ -189,11 +184,30 @@ build_conda_binaries: - uses: actions/checkout@v4.1.1 with: path: "./habitat-sim" - #- name: Set modality variable - # echo "CI_TEST=$(echo ${{ github.event_name }} == 'pull_request'" >> $GITHUB_ENV - name: Build conda Linux packages run: |- cd habitat-sim/conda-build + +# build_conda_binaries: +# runs-on: 4-core-ubuntu-gpu-t4 +# env: +# AIHABITAT_CONDA_USERNAME: aihabitat +# AIHABITAT_CONDA_PWD: ${{ secrets.AIHABITAT_CONDA_PWD }} +# AIHABITAT_NIGHTLY_CONDA_USERNAME: aihabitat-nightly +# AIHABITAT_NIGHTLY_CONDA_PWD: ${{ secrets.AIHABITAT_NIGHTLY_CONDA_PWD }} + +# defaults: +# run: +# shell: bash -el {0} +# steps: +# - uses: actions/checkout@v4.1.1 +# with: +# path: "./habitat-sim" +# - name: Set modality variable +# echo "CI_TEST=$(echo ${{ github.event_name }} == 'pull_request'" >> $GITHUB_ENV +# - name: Build conda Linux packages +# run: |- +# cd habitat-sim/conda-build # echo "Current event name: $GITHUB_EVENT_NAME" # echo ${{ env.CI_TEST }} From 337e42f00397ca0f3857919716eb82d0f16ca01c Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 13:13:43 -0800 Subject: [PATCH 40/85] try a copy example --- .github/workflows/install_and_test.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 7619cbb1f1..f2c23acfb1 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -175,18 +175,19 @@ jobs: #- name: Debugging with tmate # uses: mxschmitt/action-tmate@v3.18 -build_conda_binaries: + build_conda_binaries: runs-on: 4-core-ubuntu-gpu-t4 + env: + FPS_THRESHOLD: 900 defaults: run: shell: bash -el {0} steps: - - uses: actions/checkout@v4.1.1 - with: - path: "./habitat-sim" - - name: Build conda Linux packages - run: |- - cd habitat-sim/conda-build + - uses: actions/checkout@v4.1.1 + with: + path: "./habitat-sim" + - name: CPU info + run: cat /proc/cpuinfo # build_conda_binaries: # runs-on: 4-core-ubuntu-gpu-t4 From 037fe537b757e5886f72028a02e9b379fcb7f5fc Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 13:14:26 -0800 Subject: [PATCH 41/85] add the env variables --- .github/workflows/install_and_test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index f2c23acfb1..6c7555a20f 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -178,7 +178,8 @@ jobs: build_conda_binaries: runs-on: 4-core-ubuntu-gpu-t4 env: - FPS_THRESHOLD: 900 + AIHABITAT_CONDA_USERNAME: aihabitat + AIHABITAT_NIGHTLY_CONDA_USERNAME: aihabitat-nightly defaults: run: shell: bash -el {0} From 53d69ef0cc4633c29745d16c4a4f5f2216966d99 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 13:14:58 -0800 Subject: [PATCH 42/85] add a secrete env variable --- .github/workflows/install_and_test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 6c7555a20f..822c65e1fa 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -179,6 +179,7 @@ jobs: runs-on: 4-core-ubuntu-gpu-t4 env: AIHABITAT_CONDA_USERNAME: aihabitat + AIHABITAT_CONDA_PWD: ${{ secrets.AIHABITAT_CONDA_PWD }} AIHABITAT_NIGHTLY_CONDA_USERNAME: aihabitat-nightly defaults: run: From 0473615dd03c0bbaea9965f1f0c9dc5462244aba Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 13:17:16 -0800 Subject: [PATCH 43/85] remove test build job and add more complexity --- .github/workflows/install_and_test.yml | 232 +++++++++++++------------ 1 file changed, 118 insertions(+), 114 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 822c65e1fa..6fee4848ca 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -50,127 +50,127 @@ jobs: - name: run mypy run: mypy - install_and_test_ubuntu: - runs-on: 4-core-ubuntu-gpu-t4 - env: - FPS_THRESHOLD: 900 - defaults: - run: - shell: bash -el {0} - steps: - - uses: actions/checkout@v4.1.1 - with: - path: "./habitat-sim" - - name: CPU info - run: cat /proc/cpuinfo - - uses: "./habitat-sim/.github/actions/install_ubuntu_deps" - - uses: "./habitat-sim/.github/actions/install_ubuntu_gpu_deps" - - name: Build, install habitat-sim - run: |- - #give cmake ownership to the runner for installation - sudo chown runner -R /opt/cmake312/ - #activate conda env - export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH - conda init - source ~/.bashrc - conda activate habitat - #install habitat-sim - cd habitat-sim - pip install -r requirements.txt --progress-bar off - git submodule update --init --recursive --jobs 8 - python -u setup.py install --build-type "Release" --lto --headless --bullet - - name: Download test data - run: |- - # Disable clone protection for git lfs - export GIT_CLONE_PROTECTION_ACTIVE=false + # install_and_test_ubuntu: + # runs-on: 4-core-ubuntu-gpu-t4 + # env: + # FPS_THRESHOLD: 900 + # defaults: + # run: + # shell: bash -el {0} + # steps: + # - uses: actions/checkout@v4.1.1 + # with: + # path: "./habitat-sim" + # - name: CPU info + # run: cat /proc/cpuinfo + # - uses: "./habitat-sim/.github/actions/install_ubuntu_deps" + # - uses: "./habitat-sim/.github/actions/install_ubuntu_gpu_deps" + # - name: Build, install habitat-sim + # run: |- + # #give cmake ownership to the runner for installation + # sudo chown runner -R /opt/cmake312/ + # #activate conda env + # export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH + # conda init + # source ~/.bashrc + # conda activate habitat + # #install habitat-sim + # cd habitat-sim + # pip install -r requirements.txt --progress-bar off + # git submodule update --init --recursive --jobs 8 + # python -u setup.py install --build-type "Release" --lto --headless --bullet + # - name: Download test data + # run: |- + # # Disable clone protection for git lfs + # export GIT_CLONE_PROTECTION_ACTIVE=false - git --version - git-lfs --version - export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH - conda init - source ~/.bashrc - conda activate habitat - conda install -y gitpython git-lfs - cd habitat-sim - git lfs install - python src_python/habitat_sim/utils/datasets_download.py --uids ci_test_assets ycb rearrange_dataset_v2 --replace --data-path data/ --no-prune - ls -la data/scene_datasets/habitat-test-scenes/ - - name: Run sim benchmark - run: |- - export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH - conda init - source ~/.bashrc - conda activate habitat - cd habitat-sim - python examples/example.py --scene data/scene_datasets/habitat-test-scenes/van-gogh-room.glb --silent --test_fps_regression $FPS_THRESHOLD - - name: Run sim tests - run: |- - #give cmake ownership to the runner for installation - sudo chown runner -R /opt/cmake312/ - #activate conda env - export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH - conda init - source ~/.bashrc - conda activate habitat - cd habitat-sim - export PYTHONPATH=$(pwd):$PYTHONPATH + # git --version + # git-lfs --version + # export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH + # conda init + # source ~/.bashrc + # conda activate habitat + # conda install -y gitpython git-lfs + # cd habitat-sim + # git lfs install + # python src_python/habitat_sim/utils/datasets_download.py --uids ci_test_assets ycb rearrange_dataset_v2 --replace --data-path data/ --no-prune + # ls -la data/scene_datasets/habitat-test-scenes/ + # - name: Run sim benchmark + # run: |- + # export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH + # conda init + # source ~/.bashrc + # conda activate habitat + # cd habitat-sim + # python examples/example.py --scene data/scene_datasets/habitat-test-scenes/van-gogh-room.glb --silent --test_fps_regression $FPS_THRESHOLD + # - name: Run sim tests + # run: |- + # #give cmake ownership to the runner for installation + # sudo chown runner -R /opt/cmake312/ + # #activate conda env + # export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH + # conda init + # source ~/.bashrc + # conda activate habitat + # cd habitat-sim + # export PYTHONPATH=$(pwd):$PYTHONPATH - #set pytest to show partial progress - export PYTHONUNBUFFERED=1 + # #set pytest to show partial progress + # export PYTHONUNBUFFERED=1 - # run tests with code coverage - CORRADE_TEST_COLOR=ON GTEST_COLOR=yes ./build.sh --headless \ - --bullet \ - --with-cuda \ - --build-datatool \ - --run-tests \ - --no-lto \ - --cmake-args='-DCMAKE_CXX_FLAGS="--coverage"' - PYTHONPATH=src_python pytest -n 4 --durations=10 --cov-report=xml --cov=./ + # # run tests with code coverage + # CORRADE_TEST_COLOR=ON GTEST_COLOR=yes ./build.sh --headless \ + # --bullet \ + # --with-cuda \ + # --build-datatool \ + # --run-tests \ + # --no-lto \ + # --cmake-args='-DCMAKE_CXX_FLAGS="--coverage"' + # PYTHONPATH=src_python pytest -n 4 --durations=10 --cov-report=xml --cov=./ - #run the marked pytest-benchmark tests and print the results - PYTHONPATH=src_python pytest -m sim_benchmarks + # #run the marked pytest-benchmark tests and print the results + # PYTHONPATH=src_python pytest -m sim_benchmarks - #re-build without bullet and cuda and run physics tests again - #TODO: instead of reinstall, do this with configuration - ./build.sh --headless --cmake-args='-DCMAKE_CXX_FLAGS="--coverage"' - PYTHONPATH=src_python pytest -n 4 --durations=10 --cov-report=xml --cov=./ --cov-append tests/test_physics.py tests/test_sensors.py - - name: upload test coverage - run: |- - export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH - conda init - source ~/.bashrc - conda activate habitat - cd habitat-sim + # #re-build without bullet and cuda and run physics tests again + # #TODO: instead of reinstall, do this with configuration + # ./build.sh --headless --cmake-args='-DCMAKE_CXX_FLAGS="--coverage"' + # PYTHONPATH=src_python pytest -n 4 --durations=10 --cov-report=xml --cov=./ --cov-append tests/test_physics.py tests/test_sensors.py + # - name: upload test coverage + # run: |- + # export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH + # conda init + # source ~/.bashrc + # conda activate habitat + # cd habitat-sim - curl -Os https://uploader.codecov.io/latest/linux/codecov - chmod +x codecov - #Uploading test coverage for Python code - ./codecov -f coverage.xml -cF Python + # curl -Os https://uploader.codecov.io/latest/linux/codecov + # chmod +x codecov + # #Uploading test coverage for Python code + # ./codecov -f coverage.xml -cF Python - #Uploading test coverage for C++ code - lcov --directory . --capture --output-file coverage.info - # Replaces -1 linecount with zero to prevent lcov from crashing: - # https://github.com/psycofdj/coverxygen/issues/6 - sed -i -e 's/,-1$/,0/g' coverage.info - #lcov --remove coverage.info "*/deps/*" --output-file coverage.info > /dev/null - #lcov --remove coverage.info "*/test/*" --output-file coverage.info > /dev/null - #lcov --remove coverage.info "*/tests/*" --output-file coverage.info > /dev/null - ./codecov -f coverage.info -cF CPP - - name: install habitat-sim with audio and run audio_agent script - run: |- - #give cmake ownership to the runner for installation - sudo chown runner -R /opt/cmake312/ - export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH - conda init - source ~/.bashrc - conda activate habitat - cd habitat-sim - pip install -r requirements.txt --progress-bar off - pip install imageio imageio-ffmpeg - git submodule update --init --recursive --jobs 8 - python -u setup.py install --build-type "Release" --lto --headless --audio - python examples/tutorials/audio_agent.py + # #Uploading test coverage for C++ code + # lcov --directory . --capture --output-file coverage.info + # # Replaces -1 linecount with zero to prevent lcov from crashing: + # # https://github.com/psycofdj/coverxygen/issues/6 + # sed -i -e 's/,-1$/,0/g' coverage.info + # #lcov --remove coverage.info "*/deps/*" --output-file coverage.info > /dev/null + # #lcov --remove coverage.info "*/test/*" --output-file coverage.info > /dev/null + # #lcov --remove coverage.info "*/tests/*" --output-file coverage.info > /dev/null + # ./codecov -f coverage.info -cF CPP + # - name: install habitat-sim with audio and run audio_agent script + # run: |- + # #give cmake ownership to the runner for installation + # sudo chown runner -R /opt/cmake312/ + # export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH + # conda init + # source ~/.bashrc + # conda activate habitat + # cd habitat-sim + # pip install -r requirements.txt --progress-bar off + # pip install imageio imageio-ffmpeg + # git submodule update --init --recursive --jobs 8 + # python -u setup.py install --build-type "Release" --lto --headless --audio + # python examples/tutorials/audio_agent.py #NOTE: use the below to debug with ssh: simply move this "job" just before the crashing job to intercept the workflow #- name: Debugging with tmate # uses: mxschmitt/action-tmate@v3.18 @@ -181,6 +181,7 @@ jobs: AIHABITAT_CONDA_USERNAME: aihabitat AIHABITAT_CONDA_PWD: ${{ secrets.AIHABITAT_CONDA_PWD }} AIHABITAT_NIGHTLY_CONDA_USERNAME: aihabitat-nightly + AIHABITAT_NIGHTLY_CONDA_PWD: ${{ secrets.AIHABITAT_NIGHTLY_CONDA_PWD }} defaults: run: shell: bash -el {0} @@ -190,6 +191,9 @@ jobs: path: "./habitat-sim" - name: CPU info run: cat /proc/cpuinfo + - name: Set modality variable + run: |- + echo "CI_TEST=$(echo ${{ github.event_name }} == 'pull_request'" >> $GITHUB_ENV # build_conda_binaries: # runs-on: 4-core-ubuntu-gpu-t4 From 20d8c8e54cce54e029b9b0c3e60480e1359b9da7 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 13:19:06 -0800 Subject: [PATCH 44/85] try again --- .github/workflows/install_and_test.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 6fee4848ca..c74cefe117 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -189,11 +189,9 @@ jobs: - uses: actions/checkout@v4.1.1 with: path: "./habitat-sim" - - name: CPU info - run: cat /proc/cpuinfo - name: Set modality variable - run: |- - echo "CI_TEST=$(echo ${{ github.event_name }} == 'pull_request'" >> $GITHUB_ENV + run: echo "CI_TEST=$(echo ${{ github.event_name }} == 'pull_request'" >> $GITHUB_ENV + # build_conda_binaries: # runs-on: 4-core-ubuntu-gpu-t4 From 677c041a2499a23f0f3abf33fb49b00de5a5c55b Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 13:22:27 -0800 Subject: [PATCH 45/85] correct format --- .github/workflows/install_and_test.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index c74cefe117..7d4a18f1e5 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -190,8 +190,19 @@ jobs: with: path: "./habitat-sim" - name: Set modality variable - run: echo "CI_TEST=$(echo ${{ github.event_name }} == 'pull_request'" >> $GITHUB_ENV + run: echo "CI_TEST=${{ github.event_name == 'pull_request' }}" >> $GITHUB_ENV + - name: Build conda Linux packages + run: |- + cd habitat-sim/conda-build + echo "Current event name: $GITHUB_EVENT_NAME" + echo ${{ env.CI_TEST }} + #pivot on the build type + if [[ ${{ github.event_name }} == 'pull_request' ]]; then + echo "Conda name: $AIHABITAT_CONDA_USERNAME" + else + echo "Conda name: $AIHABITAT_NIGHTLY_CONDA_USERNAME" + fi # build_conda_binaries: # runs-on: 4-core-ubuntu-gpu-t4 From d0c1f8bd0fb2fd97d454ef72376779693d8c4127 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 13:32:44 -0800 Subject: [PATCH 46/85] try a few more edits --- .github/workflows/install_and_test.yml | 46 +++++++++----------------- 1 file changed, 16 insertions(+), 30 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 7d4a18f1e5..87151a01e3 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -189,13 +189,19 @@ jobs: - uses: actions/checkout@v4.1.1 with: path: "./habitat-sim" - - name: Set modality variable - run: echo "CI_TEST=${{ github.event_name == 'pull_request' }}" >> $GITHUB_ENV + - name: Set CI_TEST variable based on "main merge" vs. "pull_request" workflow + run: |- + echo "CI_TEST=${{ github.event_name == 'pull_request' }}" >> $GITHUB_ENV + if [${{ github.event_name }} == 'pull_request' ]; then + echo "CONDA_USERNAME=${{ AIHABITAT_CONDA_USERNAME }}" >> $GITHUB_ENV + echo "CONDA_PWD=${{ AIHABITAT_CONDA_PWD }}" >> $GITHUB_ENV + fi - name: Build conda Linux packages run: |- cd habitat-sim/conda-build echo "Current event name: $GITHUB_EVENT_NAME" echo ${{ env.CI_TEST }} + echo ${{ env.CONDA_USERNAME }} #pivot on the build type if [[ ${{ github.event_name }} == 'pull_request' ]]; then @@ -204,32 +210,12 @@ jobs: echo "Conda name: $AIHABITAT_NIGHTLY_CONDA_USERNAME" fi -# build_conda_binaries: -# runs-on: 4-core-ubuntu-gpu-t4 -# env: -# AIHABITAT_CONDA_USERNAME: aihabitat -# AIHABITAT_CONDA_PWD: ${{ secrets.AIHABITAT_CONDA_PWD }} -# AIHABITAT_NIGHTLY_CONDA_USERNAME: aihabitat-nightly -# AIHABITAT_NIGHTLY_CONDA_PWD: ${{ secrets.AIHABITAT_NIGHTLY_CONDA_PWD }} + if [${{ env.CI_TEST }} == "false"]; then + echo "this is not a CI test" + # # Install anaconda to work with packages repo + # curl -O https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh + # bash Anaconda3-2020.11-Linux-x86_64.sh -b -p $HOME/anaconda + # export PATH=$HOME/anaconda/bin:$PATH -# defaults: -# run: -# shell: bash -el {0} -# steps: -# - uses: actions/checkout@v4.1.1 -# with: -# path: "./habitat-sim" -# - name: Set modality variable -# echo "CI_TEST=$(echo ${{ github.event_name }} == 'pull_request'" >> $GITHUB_ENV -# - name: Build conda Linux packages -# run: |- -# cd habitat-sim/conda-build -# echo "Current event name: $GITHUB_EVENT_NAME" -# echo ${{ env.CI_TEST }} - -# #pivot on the build type -# if [[ ${{ github.event_name }} == 'pull_request' ]]; then -# echo "Conda name: $AIHABITAT_CONDA_USERNAME" -# else -# echo "Conda name: $AIHABITAT_NIGHTLY_CONDA_USERNAME" -# fi + # python common/delete_old_night_packages.py --username << parameters.AIHABITAT_CONDA_CHN >> --password $<< parameters.AIHABITAT_CONDA_CHN_PWD_VAR >> << parameters.NIGHTLY_FLAG >> <> + fi From 0219afb17f00e0c94a02b33b6d2f1a9301d1290e Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 13:33:44 -0800 Subject: [PATCH 47/85] try again --- .github/workflows/install_and_test.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 87151a01e3..66a1085a35 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -210,12 +210,11 @@ jobs: echo "Conda name: $AIHABITAT_NIGHTLY_CONDA_USERNAME" fi - if [${{ env.CI_TEST }} == "false"]; then - echo "this is not a CI test" - # # Install anaconda to work with packages repo - # curl -O https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh - # bash Anaconda3-2020.11-Linux-x86_64.sh -b -p $HOME/anaconda - # export PATH=$HOME/anaconda/bin:$PATH - - # python common/delete_old_night_packages.py --username << parameters.AIHABITAT_CONDA_CHN >> --password $<< parameters.AIHABITAT_CONDA_CHN_PWD_VAR >> << parameters.NIGHTLY_FLAG >> <> - fi + # if [${{ env.CI_TEST }} == "false"]; then + # echo "this is not a CI test" + # # # Install anaconda to work with packages repo + # # curl -O https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh + # # bash Anaconda3-2020.11-Linux-x86_64.sh -b -p $HOME/anaconda + # # export PATH=$HOME/anaconda/bin:$PATH + # # python common/delete_old_night_packages.py --username << parameters.AIHABITAT_CONDA_CHN >> --password $<< parameters.AIHABITAT_CONDA_CHN_PWD_VAR >> << parameters.NIGHTLY_FLAG >> <> + # fi From e21ee950e7c49443259d781fa8c021ca4ded5065 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 13:35:18 -0800 Subject: [PATCH 48/85] try removing more --- .github/workflows/install_and_test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 66a1085a35..fdcccf2598 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -192,10 +192,10 @@ jobs: - name: Set CI_TEST variable based on "main merge" vs. "pull_request" workflow run: |- echo "CI_TEST=${{ github.event_name == 'pull_request' }}" >> $GITHUB_ENV - if [${{ github.event_name }} == 'pull_request' ]; then - echo "CONDA_USERNAME=${{ AIHABITAT_CONDA_USERNAME }}" >> $GITHUB_ENV - echo "CONDA_PWD=${{ AIHABITAT_CONDA_PWD }}" >> $GITHUB_ENV - fi + # if [${{ github.event_name }} == 'pull_request' ]; then + # echo "CONDA_USERNAME=${{ AIHABITAT_CONDA_USERNAME }}" >> $GITHUB_ENV + # echo "CONDA_PWD=${{ AIHABITAT_CONDA_PWD }}" >> $GITHUB_ENV + # fi - name: Build conda Linux packages run: |- cd habitat-sim/conda-build From 16deed75d40b3d9ffa5226462ccb0533ae4dda8f Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 13:36:02 -0800 Subject: [PATCH 49/85] back to something that works? --- .github/workflows/install_and_test.yml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index fdcccf2598..31517931e9 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -192,16 +192,11 @@ jobs: - name: Set CI_TEST variable based on "main merge" vs. "pull_request" workflow run: |- echo "CI_TEST=${{ github.event_name == 'pull_request' }}" >> $GITHUB_ENV - # if [${{ github.event_name }} == 'pull_request' ]; then - # echo "CONDA_USERNAME=${{ AIHABITAT_CONDA_USERNAME }}" >> $GITHUB_ENV - # echo "CONDA_PWD=${{ AIHABITAT_CONDA_PWD }}" >> $GITHUB_ENV - # fi - name: Build conda Linux packages run: |- cd habitat-sim/conda-build echo "Current event name: $GITHUB_EVENT_NAME" echo ${{ env.CI_TEST }} - echo ${{ env.CONDA_USERNAME }} #pivot on the build type if [[ ${{ github.event_name }} == 'pull_request' ]]; then @@ -209,12 +204,3 @@ jobs: else echo "Conda name: $AIHABITAT_NIGHTLY_CONDA_USERNAME" fi - - # if [${{ env.CI_TEST }} == "false"]; then - # echo "this is not a CI test" - # # # Install anaconda to work with packages repo - # # curl -O https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh - # # bash Anaconda3-2020.11-Linux-x86_64.sh -b -p $HOME/anaconda - # # export PATH=$HOME/anaconda/bin:$PATH - # # python common/delete_old_night_packages.py --username << parameters.AIHABITAT_CONDA_CHN >> --password $<< parameters.AIHABITAT_CONDA_CHN_PWD_VAR >> << parameters.NIGHTLY_FLAG >> <> - # fi From 4b5823abf893d7ca596af74d14ce141d09dd2707 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 13:37:00 -0800 Subject: [PATCH 50/85] one step --- .github/workflows/install_and_test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 31517931e9..33ab8afa39 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -192,6 +192,9 @@ jobs: - name: Set CI_TEST variable based on "main merge" vs. "pull_request" workflow run: |- echo "CI_TEST=${{ github.event_name == 'pull_request' }}" >> $GITHUB_ENV + if [[ ${{ github.event_name }} == 'pull_request' ]]; then + echo "this is a test" + fi - name: Build conda Linux packages run: |- cd habitat-sim/conda-build From ae8d2c5b608596c541f235e9e8d853f8452cba7f Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 13:38:21 -0800 Subject: [PATCH 51/85] try to conditional setter --- .github/workflows/install_and_test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 33ab8afa39..e94aecb922 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -193,13 +193,14 @@ jobs: run: |- echo "CI_TEST=${{ github.event_name == 'pull_request' }}" >> $GITHUB_ENV if [[ ${{ github.event_name }} == 'pull_request' ]]; then - echo "this is a test" + echo "CONDA_USERNAME=${{ AIHABITAT_CONDA_USERNAME == 'pull_request' }}" >> $GITHUB_ENV fi - name: Build conda Linux packages run: |- cd habitat-sim/conda-build echo "Current event name: $GITHUB_EVENT_NAME" echo ${{ env.CI_TEST }} + echo ${{ env.CONDA_USERNAME }} #pivot on the build type if [[ ${{ github.event_name }} == 'pull_request' ]]; then From e4147d8964c26e6657fbea4ec6b2b00a488fef51 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 13:39:19 -0800 Subject: [PATCH 52/85] try again --- .github/workflows/install_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index e94aecb922..9bd3609667 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -193,7 +193,7 @@ jobs: run: |- echo "CI_TEST=${{ github.event_name == 'pull_request' }}" >> $GITHUB_ENV if [[ ${{ github.event_name }} == 'pull_request' ]]; then - echo "CONDA_USERNAME=${{ AIHABITAT_CONDA_USERNAME == 'pull_request' }}" >> $GITHUB_ENV + echo "CONDA_USERNAME=${{ AIHABITAT_CONDA_USERNAME }}" >> $GITHUB_ENV fi - name: Build conda Linux packages run: |- From b3ed1c74a6151ff7f4454ae029004bc21d78c36c Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 13:40:13 -0800 Subject: [PATCH 53/85] another way --- .github/workflows/install_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 9bd3609667..37b1058305 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -193,7 +193,7 @@ jobs: run: |- echo "CI_TEST=${{ github.event_name == 'pull_request' }}" >> $GITHUB_ENV if [[ ${{ github.event_name }} == 'pull_request' ]]; then - echo "CONDA_USERNAME=${{ AIHABITAT_CONDA_USERNAME }}" >> $GITHUB_ENV + echo "CONDA_USERNAME=$AIHABITAT_CONDA_USERNAME" >> $GITHUB_ENV fi - name: Build conda Linux packages run: |- From 10079345f903cc731a45bb8b06b5b9278d303883 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 13:41:36 -0800 Subject: [PATCH 54/85] expand --- .github/workflows/install_and_test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 37b1058305..c5864c838e 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -194,6 +194,10 @@ jobs: echo "CI_TEST=${{ github.event_name == 'pull_request' }}" >> $GITHUB_ENV if [[ ${{ github.event_name }} == 'pull_request' ]]; then echo "CONDA_USERNAME=$AIHABITAT_CONDA_USERNAME" >> $GITHUB_ENV + echo "CONDA_PWD=$AIHABITAT_CONDA_PWD" >> $GITHUB_ENV + else + echo "CONDA_USERNAME=$AIHABITAT_NIGHTLY_CONDA_USERNAME" >> $GITHUB_ENV + echo "CONDA_PWD=$AIHABITAT_NIGHTLY_CONDA_PWD" >> $GITHUB_ENV fi - name: Build conda Linux packages run: |- From b47e178cbab04a4b223fa873c8f912bf8a5fbceb Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 13:42:12 -0800 Subject: [PATCH 55/85] try another --- .github/workflows/install_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index c5864c838e..92adcfef6c 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -192,7 +192,7 @@ jobs: - name: Set CI_TEST variable based on "main merge" vs. "pull_request" workflow run: |- echo "CI_TEST=${{ github.event_name == 'pull_request' }}" >> $GITHUB_ENV - if [[ ${{ github.event_name }} == 'pull_request' ]]; then + if [[ ${{ github.event_name }} == 'push' ]]; then echo "CONDA_USERNAME=$AIHABITAT_CONDA_USERNAME" >> $GITHUB_ENV echo "CONDA_PWD=$AIHABITAT_CONDA_PWD" >> $GITHUB_ENV else From 26829e33c2939c41dacf64f3e72ff6d1feba72c3 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 14:26:02 -0800 Subject: [PATCH 56/85] setup the actual trigger set --- .github/workflows/install_and_test.yml | 30 ++++++++++++++++++++------ 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 92adcfef6c..78c6ee7bde 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -4,6 +4,10 @@ on: push: branches: - main + tags: [ "v*" ] + schedule: + - cron: "0 5 * * *" + #this is 9PM PST jobs: python_lint: @@ -192,23 +196,35 @@ jobs: - name: Set CI_TEST variable based on "main merge" vs. "pull_request" workflow run: |- echo "CI_TEST=${{ github.event_name == 'pull_request' }}" >> $GITHUB_ENV + if [[ ${{ github.event_name }} == 'push' ]]; then - echo "CONDA_USERNAME=$AIHABITAT_CONDA_USERNAME" >> $GITHUB_ENV - echo "CONDA_PWD=$AIHABITAT_CONDA_PWD" >> $GITHUB_ENV - else + if [[ ${GITHUB_REF} == refs/heads/* ]]; then + #trigger a push to main branch + echo "CI_TEST='true'" >> $GITHUB_ENV + elif [[ ${GITHUB_REF} == refs/tags/* ]]; then + #trigger a version tag push + echo "CI_TEST='false'" >> $GITHUB_ENV + echo "CONDA_USERNAME=$AIHABITAT_CONDA_USERNAME" >> $GITHUB_ENV + echo "CONDA_PWD=$AIHABITAT_CONDA_PWD" >> $GITHUB_ENV + fi + elif [[ ${{ github.event_name }} == 'schedule' ]]; then + #trigger: a nightly build + echo "CI_TEST='false'" >> $GITHUB_ENV echo "CONDA_USERNAME=$AIHABITAT_NIGHTLY_CONDA_USERNAME" >> $GITHUB_ENV echo "CONDA_PWD=$AIHABITAT_NIGHTLY_CONDA_PWD" >> $GITHUB_ENV + elif [[ ${{ github.event_name }} == 'pull_request' ]]; + #trigger: a pull request + echo "CI_TEST='true'" >> $GITHUB_ENV fi - name: Build conda Linux packages run: |- cd habitat-sim/conda-build echo "Current event name: $GITHUB_EVENT_NAME" echo ${{ env.CI_TEST }} - echo ${{ env.CONDA_USERNAME }} #pivot on the build type - if [[ ${{ github.event_name }} == 'pull_request' ]]; then - echo "Conda name: $AIHABITAT_CONDA_USERNAME" + if [[ ${{ env.CI_TEST }} ]]; then + echo "This is a CI test." else - echo "Conda name: $AIHABITAT_NIGHTLY_CONDA_USERNAME" + echo "This is an actual build" fi From 6780cfb69ebe08d0173c6cbdb4b7526f2aceb728 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 14:27:36 -0800 Subject: [PATCH 57/85] try again --- .github/workflows/install_and_test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 78c6ee7bde..7e90eae5d5 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -195,7 +195,6 @@ jobs: path: "./habitat-sim" - name: Set CI_TEST variable based on "main merge" vs. "pull_request" workflow run: |- - echo "CI_TEST=${{ github.event_name == 'pull_request' }}" >> $GITHUB_ENV if [[ ${{ github.event_name }} == 'push' ]]; then if [[ ${GITHUB_REF} == refs/heads/* ]]; then From 554b438bcd35c83301de4b14c39b6a548d39a632 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 14:28:09 -0800 Subject: [PATCH 58/85] fix if then typo --- .github/workflows/install_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 7e90eae5d5..92280a2a1e 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -211,7 +211,7 @@ jobs: echo "CI_TEST='false'" >> $GITHUB_ENV echo "CONDA_USERNAME=$AIHABITAT_NIGHTLY_CONDA_USERNAME" >> $GITHUB_ENV echo "CONDA_PWD=$AIHABITAT_NIGHTLY_CONDA_PWD" >> $GITHUB_ENV - elif [[ ${{ github.event_name }} == 'pull_request' ]]; + elif [[ ${{ github.event_name }} == 'pull_request' ]]; then #trigger: a pull request echo "CI_TEST='true'" >> $GITHUB_ENV fi From 710ace67b9d0537f549e43961b96948b255bd054 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 14:32:41 -0800 Subject: [PATCH 59/85] try to create a nightly var --- .github/workflows/install_and_test.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 92280a2a1e..7877fe5fca 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -195,7 +195,7 @@ jobs: path: "./habitat-sim" - name: Set CI_TEST variable based on "main merge" vs. "pull_request" workflow run: |- - + echo "NIGHTLY='true'" >> $GITHUB_ENV if [[ ${{ github.event_name }} == 'push' ]]; then if [[ ${GITHUB_REF} == refs/heads/* ]]; then #trigger a push to main branch @@ -214,16 +214,25 @@ jobs: elif [[ ${{ github.event_name }} == 'pull_request' ]]; then #trigger: a pull request echo "CI_TEST='true'" >> $GITHUB_ENV + echo "NIGHTLY='false'" >> $GITHUB_ENV fi - name: Build conda Linux packages run: |- cd habitat-sim/conda-build echo "Current event name: $GITHUB_EVENT_NAME" echo ${{ env.CI_TEST }} + echo ${{ env.NIGHTLY }} #pivot on the build type if [[ ${{ env.CI_TEST }} ]]; then echo "This is a CI test." else - echo "This is an actual build" + echo "This is a full conda build with deployment." + # Install anaconda to work with packages repo + curl -O https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh + bash Anaconda3-2020.11-Linux-x86_64.sh -b -p $HOME/anaconda + export PATH=$HOME/anaconda/bin:$PATH + + # Delete old nightly builds + #python common/delete_old_night_packages.py --username << parameters.AIHABITAT_CONDA_CHN >> --password $<< parameters.AIHABITAT_CONDA_CHN_PWD_VAR >> fi From 52f18a52cbc52a110311989c99303fee7bfeab17 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 14:42:01 -0800 Subject: [PATCH 60/85] try adding the docker build --- .github/workflows/install_and_test.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 7877fe5fca..bc684616c2 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -195,11 +195,11 @@ jobs: path: "./habitat-sim" - name: Set CI_TEST variable based on "main merge" vs. "pull_request" workflow run: |- - echo "NIGHTLY='true'" >> $GITHUB_ENV + echo "NIGHTLY='false'" >> $GITHUB_ENV + echo "CI_TEST='true'" >> $GITHUB_ENV if [[ ${{ github.event_name }} == 'push' ]]; then if [[ ${GITHUB_REF} == refs/heads/* ]]; then #trigger a push to main branch - echo "CI_TEST='true'" >> $GITHUB_ENV elif [[ ${GITHUB_REF} == refs/tags/* ]]; then #trigger a version tag push echo "CI_TEST='false'" >> $GITHUB_ENV @@ -209,12 +209,11 @@ jobs: elif [[ ${{ github.event_name }} == 'schedule' ]]; then #trigger: a nightly build echo "CI_TEST='false'" >> $GITHUB_ENV + echo "NIGHTLY='true'" >> $GITHUB_ENV echo "CONDA_USERNAME=$AIHABITAT_NIGHTLY_CONDA_USERNAME" >> $GITHUB_ENV echo "CONDA_PWD=$AIHABITAT_NIGHTLY_CONDA_PWD" >> $GITHUB_ENV elif [[ ${{ github.event_name }} == 'pull_request' ]]; then #trigger: a pull request - echo "CI_TEST='true'" >> $GITHUB_ENV - echo "NIGHTLY='false'" >> $GITHUB_ENV fi - name: Build conda Linux packages run: |- @@ -234,5 +233,15 @@ jobs: export PATH=$HOME/anaconda/bin:$PATH # Delete old nightly builds - #python common/delete_old_night_packages.py --username << parameters.AIHABITAT_CONDA_CHN >> --password $<< parameters.AIHABITAT_CONDA_CHN_PWD_VAR >> + #python common/delete_old_night_packages.py --username $CONDA_USERNAME --password $CONDA_PWD fi + + #install Docker + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - + sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" + sudo apt-get update + apt-cache policy docker-ce + sudo apt-get install -y docker-ce + + #build the container + docker build -t hsim_condabuild_dcontainer -f Dockerfile . From eb93eeacc99fdb0d3158c73227b6bb198d48120c Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 14:43:40 -0800 Subject: [PATCH 61/85] fill the empty space with echo --- .github/workflows/install_and_test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index bc684616c2..e0e7c24b34 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -199,21 +199,21 @@ jobs: echo "CI_TEST='true'" >> $GITHUB_ENV if [[ ${{ github.event_name }} == 'push' ]]; then if [[ ${GITHUB_REF} == refs/heads/* ]]; then - #trigger a push to main branch + echo "trigger: a push to main branch" elif [[ ${GITHUB_REF} == refs/tags/* ]]; then - #trigger a version tag push + echo "trigger: a version tag push" echo "CI_TEST='false'" >> $GITHUB_ENV echo "CONDA_USERNAME=$AIHABITAT_CONDA_USERNAME" >> $GITHUB_ENV echo "CONDA_PWD=$AIHABITAT_CONDA_PWD" >> $GITHUB_ENV fi elif [[ ${{ github.event_name }} == 'schedule' ]]; then - #trigger: a nightly build + echo "trigger: a nightly build" echo "CI_TEST='false'" >> $GITHUB_ENV echo "NIGHTLY='true'" >> $GITHUB_ENV echo "CONDA_USERNAME=$AIHABITAT_NIGHTLY_CONDA_USERNAME" >> $GITHUB_ENV echo "CONDA_PWD=$AIHABITAT_NIGHTLY_CONDA_PWD" >> $GITHUB_ENV elif [[ ${{ github.event_name }} == 'pull_request' ]]; then - #trigger: a pull request + echo "trigger: a pull request" fi - name: Build conda Linux packages run: |- From 0699dd8720d5d969fde564688752d393b3da7bc1 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 14:53:43 -0800 Subject: [PATCH 62/85] try to add the ci conda build and pre-commit job --- .github/workflows/install_and_test.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index e0e7c24b34..bb4257e7b4 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -10,6 +10,23 @@ on: #this is 9PM PST jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.1 + - name: Setup python + uses: actions/setup-python@v5.0.0 + with: + python-version: '3.9.16' + - name: install dependencies + run: |- + pip install -U pip setuptools pre-commit + # Install the hooks now so that they'll be cached + pre-commit install-hooks + - name: Check Code Style using pre-commit + run: |- + SKIP=eslint pre-commit run --show-diff-on-failure --all-files + python_lint: runs-on: ubuntu-latest steps: @@ -245,3 +262,9 @@ jobs: #build the container docker build -t hsim_condabuild_dcontainer -f Dockerfile . + + if [[ ${{ env.CI_TEST }} ]]; then + docker run -it --ipc=host --rm -v $(pwd)/../../:/remote hsim_condabuild_dcontainer /bin/bash -c "source ~/.bashrc && conda activate py39 && cd /remote/habitat-sim/ && git config --global --add safe.directory '*' && cd /remote/habitat-sim/conda-build && python matrix_builder.py --ci_test + else + echo "TODO: the deployment command" + fi From f6d0fc15c3ba6b1521890121d4600bcaf9dde6c6 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 15:00:00 -0800 Subject: [PATCH 63/85] typo in conda build command --- .github/workflows/install_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index bb4257e7b4..47e531bd5a 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -264,7 +264,7 @@ jobs: docker build -t hsim_condabuild_dcontainer -f Dockerfile . if [[ ${{ env.CI_TEST }} ]]; then - docker run -it --ipc=host --rm -v $(pwd)/../../:/remote hsim_condabuild_dcontainer /bin/bash -c "source ~/.bashrc && conda activate py39 && cd /remote/habitat-sim/ && git config --global --add safe.directory '*' && cd /remote/habitat-sim/conda-build && python matrix_builder.py --ci_test + docker run -it --ipc=host --rm -v $(pwd)/../../:/remote hsim_condabuild_dcontainer /bin/bash -c "source ~/.bashrc && conda activate py39 && cd /remote/habitat-sim/ && git config --global --add safe.directory '*' && cd /remote/habitat-sim/conda-build && python matrix_builder.py --ci_test" else echo "TODO: the deployment command" fi From 673dc11bd92e14030eba90ab679eb4214d8a172e Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 15:09:48 -0800 Subject: [PATCH 64/85] add a debug ssh session to test out the conda command --- .github/workflows/install_and_test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 47e531bd5a..c1c2f377e2 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -232,6 +232,8 @@ jobs: elif [[ ${{ github.event_name }} == 'pull_request' ]]; then echo "trigger: a pull request" fi + - name: Debugging with tmate + uses: mxschmitt/action-tmate@v3.18 - name: Build conda Linux packages run: |- cd habitat-sim/conda-build From 1a1da75f2f0b8ebd7483e2cb89f949c64440ba78 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Wed, 20 Nov 2024 15:23:58 -0800 Subject: [PATCH 65/85] remove the debugging and try without -it --- .github/workflows/install_and_test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index c1c2f377e2..e94b9ca01c 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -232,8 +232,8 @@ jobs: elif [[ ${{ github.event_name }} == 'pull_request' ]]; then echo "trigger: a pull request" fi - - name: Debugging with tmate - uses: mxschmitt/action-tmate@v3.18 + #- name: Debugging with tmate + # uses: mxschmitt/action-tmate@v3.18 - name: Build conda Linux packages run: |- cd habitat-sim/conda-build @@ -266,7 +266,7 @@ jobs: docker build -t hsim_condabuild_dcontainer -f Dockerfile . if [[ ${{ env.CI_TEST }} ]]; then - docker run -it --ipc=host --rm -v $(pwd)/../../:/remote hsim_condabuild_dcontainer /bin/bash -c "source ~/.bashrc && conda activate py39 && cd /remote/habitat-sim/ && git config --global --add safe.directory '*' && cd /remote/habitat-sim/conda-build && python matrix_builder.py --ci_test" + docker run --ipc=host --rm -v $(pwd)/../../:/remote hsim_condabuild_dcontainer /bin/bash -c "source ~/.bashrc && conda activate py39 && cd /remote/habitat-sim/ && git config --global --add safe.directory '*' && cd /remote/habitat-sim/conda-build && python matrix_builder.py --ci_test" else echo "TODO: the deployment command" fi From e255dc19acc965c9da474ad582a8a47f7330ed75 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Thu, 21 Nov 2024 11:00:43 -0800 Subject: [PATCH 66/85] add back testing, add osx conda build, add ubuntu conda deployment --- .github/workflows/install_and_test.yml | 310 +++++++++++++++---------- 1 file changed, 190 insertions(+), 120 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index e94b9ca01c..a0add34ea1 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -71,127 +71,127 @@ jobs: - name: run mypy run: mypy - # install_and_test_ubuntu: - # runs-on: 4-core-ubuntu-gpu-t4 - # env: - # FPS_THRESHOLD: 900 - # defaults: - # run: - # shell: bash -el {0} - # steps: - # - uses: actions/checkout@v4.1.1 - # with: - # path: "./habitat-sim" - # - name: CPU info - # run: cat /proc/cpuinfo - # - uses: "./habitat-sim/.github/actions/install_ubuntu_deps" - # - uses: "./habitat-sim/.github/actions/install_ubuntu_gpu_deps" - # - name: Build, install habitat-sim - # run: |- - # #give cmake ownership to the runner for installation - # sudo chown runner -R /opt/cmake312/ - # #activate conda env - # export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH - # conda init - # source ~/.bashrc - # conda activate habitat - # #install habitat-sim - # cd habitat-sim - # pip install -r requirements.txt --progress-bar off - # git submodule update --init --recursive --jobs 8 - # python -u setup.py install --build-type "Release" --lto --headless --bullet - # - name: Download test data - # run: |- - # # Disable clone protection for git lfs - # export GIT_CLONE_PROTECTION_ACTIVE=false + install_and_test_ubuntu: + runs-on: 4-core-ubuntu-gpu-t4 + env: + FPS_THRESHOLD: 900 + defaults: + run: + shell: bash -el {0} + steps: + - uses: actions/checkout@v4.1.1 + with: + path: "./habitat-sim" + - name: CPU info + run: cat /proc/cpuinfo + - uses: "./habitat-sim/.github/actions/install_ubuntu_deps" + - uses: "./habitat-sim/.github/actions/install_ubuntu_gpu_deps" + - name: Build, install habitat-sim + run: |- + #give cmake ownership to the runner for installation + sudo chown runner -R /opt/cmake312/ + #activate conda env + export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH + conda init + source ~/.bashrc + conda activate habitat + #install habitat-sim + cd habitat-sim + pip install -r requirements.txt --progress-bar off + git submodule update --init --recursive --jobs 8 + python -u setup.py install --build-type "Release" --lto --headless --bullet + - name: Download test data + run: |- + # Disable clone protection for git lfs + export GIT_CLONE_PROTECTION_ACTIVE=false - # git --version - # git-lfs --version - # export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH - # conda init - # source ~/.bashrc - # conda activate habitat - # conda install -y gitpython git-lfs - # cd habitat-sim - # git lfs install - # python src_python/habitat_sim/utils/datasets_download.py --uids ci_test_assets ycb rearrange_dataset_v2 --replace --data-path data/ --no-prune - # ls -la data/scene_datasets/habitat-test-scenes/ - # - name: Run sim benchmark - # run: |- - # export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH - # conda init - # source ~/.bashrc - # conda activate habitat - # cd habitat-sim - # python examples/example.py --scene data/scene_datasets/habitat-test-scenes/van-gogh-room.glb --silent --test_fps_regression $FPS_THRESHOLD - # - name: Run sim tests - # run: |- - # #give cmake ownership to the runner for installation - # sudo chown runner -R /opt/cmake312/ - # #activate conda env - # export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH - # conda init - # source ~/.bashrc - # conda activate habitat - # cd habitat-sim - # export PYTHONPATH=$(pwd):$PYTHONPATH + git --version + git-lfs --version + export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH + conda init + source ~/.bashrc + conda activate habitat + conda install -y gitpython git-lfs + cd habitat-sim + git lfs install + python src_python/habitat_sim/utils/datasets_download.py --uids ci_test_assets ycb rearrange_dataset_v2 --replace --data-path data/ --no-prune + ls -la data/scene_datasets/habitat-test-scenes/ + - name: Run sim benchmark + run: |- + export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH + conda init + source ~/.bashrc + conda activate habitat + cd habitat-sim + python examples/example.py --scene data/scene_datasets/habitat-test-scenes/van-gogh-room.glb --silent --test_fps_regression $FPS_THRESHOLD + - name: Run sim tests + run: |- + #give cmake ownership to the runner for installation + sudo chown runner -R /opt/cmake312/ + #activate conda env + export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH + conda init + source ~/.bashrc + conda activate habitat + cd habitat-sim + export PYTHONPATH=$(pwd):$PYTHONPATH - # #set pytest to show partial progress - # export PYTHONUNBUFFERED=1 + #set pytest to show partial progress + export PYTHONUNBUFFERED=1 - # # run tests with code coverage - # CORRADE_TEST_COLOR=ON GTEST_COLOR=yes ./build.sh --headless \ - # --bullet \ - # --with-cuda \ - # --build-datatool \ - # --run-tests \ - # --no-lto \ - # --cmake-args='-DCMAKE_CXX_FLAGS="--coverage"' - # PYTHONPATH=src_python pytest -n 4 --durations=10 --cov-report=xml --cov=./ + # run tests with code coverage + CORRADE_TEST_COLOR=ON GTEST_COLOR=yes ./build.sh --headless \ + --bullet \ + --with-cuda \ + --build-datatool \ + --run-tests \ + --no-lto \ + --cmake-args='-DCMAKE_CXX_FLAGS="--coverage"' + PYTHONPATH=src_python pytest -n 4 --durations=10 --cov-report=xml --cov=./ - # #run the marked pytest-benchmark tests and print the results - # PYTHONPATH=src_python pytest -m sim_benchmarks + #run the marked pytest-benchmark tests and print the results + PYTHONPATH=src_python pytest -m sim_benchmarks - # #re-build without bullet and cuda and run physics tests again - # #TODO: instead of reinstall, do this with configuration - # ./build.sh --headless --cmake-args='-DCMAKE_CXX_FLAGS="--coverage"' - # PYTHONPATH=src_python pytest -n 4 --durations=10 --cov-report=xml --cov=./ --cov-append tests/test_physics.py tests/test_sensors.py - # - name: upload test coverage - # run: |- - # export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH - # conda init - # source ~/.bashrc - # conda activate habitat - # cd habitat-sim + #re-build without bullet and cuda and run physics tests again + #TODO: instead of reinstall, do this with configuration + ./build.sh --headless --cmake-args='-DCMAKE_CXX_FLAGS="--coverage"' + PYTHONPATH=src_python pytest -n 4 --durations=10 --cov-report=xml --cov=./ --cov-append tests/test_physics.py tests/test_sensors.py + - name: upload test coverage + run: |- + export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH + conda init + source ~/.bashrc + conda activate habitat + cd habitat-sim - # curl -Os https://uploader.codecov.io/latest/linux/codecov - # chmod +x codecov - # #Uploading test coverage for Python code - # ./codecov -f coverage.xml -cF Python + curl -Os https://uploader.codecov.io/latest/linux/codecov + chmod +x codecov + #Uploading test coverage for Python code + ./codecov -f coverage.xml -cF Python - # #Uploading test coverage for C++ code - # lcov --directory . --capture --output-file coverage.info - # # Replaces -1 linecount with zero to prevent lcov from crashing: - # # https://github.com/psycofdj/coverxygen/issues/6 - # sed -i -e 's/,-1$/,0/g' coverage.info - # #lcov --remove coverage.info "*/deps/*" --output-file coverage.info > /dev/null - # #lcov --remove coverage.info "*/test/*" --output-file coverage.info > /dev/null - # #lcov --remove coverage.info "*/tests/*" --output-file coverage.info > /dev/null - # ./codecov -f coverage.info -cF CPP - # - name: install habitat-sim with audio and run audio_agent script - # run: |- - # #give cmake ownership to the runner for installation - # sudo chown runner -R /opt/cmake312/ - # export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH - # conda init - # source ~/.bashrc - # conda activate habitat - # cd habitat-sim - # pip install -r requirements.txt --progress-bar off - # pip install imageio imageio-ffmpeg - # git submodule update --init --recursive --jobs 8 - # python -u setup.py install --build-type "Release" --lto --headless --audio - # python examples/tutorials/audio_agent.py + #Uploading test coverage for C++ code + lcov --directory . --capture --output-file coverage.info + # Replaces -1 linecount with zero to prevent lcov from crashing: + # https://github.com/psycofdj/coverxygen/issues/6 + sed -i -e 's/,-1$/,0/g' coverage.info + #lcov --remove coverage.info "*/deps/*" --output-file coverage.info > /dev/null + #lcov --remove coverage.info "*/test/*" --output-file coverage.info > /dev/null + #lcov --remove coverage.info "*/tests/*" --output-file coverage.info > /dev/null + ./codecov -f coverage.info -cF CPP + - name: install habitat-sim with audio and run audio_agent script + run: |- + #give cmake ownership to the runner for installation + sudo chown runner -R /opt/cmake312/ + export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH + conda init + source ~/.bashrc + conda activate habitat + cd habitat-sim + pip install -r requirements.txt --progress-bar off + pip install imageio imageio-ffmpeg + git submodule update --init --recursive --jobs 8 + python -u setup.py install --build-type "Release" --lto --headless --audio + python examples/tutorials/audio_agent.py #NOTE: use the below to debug with ssh: simply move this "job" just before the crashing job to intercept the workflow #- name: Debugging with tmate # uses: mxschmitt/action-tmate@v3.18 @@ -212,7 +212,7 @@ jobs: path: "./habitat-sim" - name: Set CI_TEST variable based on "main merge" vs. "pull_request" workflow run: |- - echo "NIGHTLY='false'" >> $GITHUB_ENV + echo "NIGHTLY=''" >> $GITHUB_ENV echo "CI_TEST='true'" >> $GITHUB_ENV if [[ ${{ github.event_name }} == 'push' ]]; then if [[ ${GITHUB_REF} == refs/heads/* ]]; then @@ -226,14 +226,12 @@ jobs: elif [[ ${{ github.event_name }} == 'schedule' ]]; then echo "trigger: a nightly build" echo "CI_TEST='false'" >> $GITHUB_ENV - echo "NIGHTLY='true'" >> $GITHUB_ENV + echo "NIGHTLY='--nightly'" >> $GITHUB_ENV echo "CONDA_USERNAME=$AIHABITAT_NIGHTLY_CONDA_USERNAME" >> $GITHUB_ENV echo "CONDA_PWD=$AIHABITAT_NIGHTLY_CONDA_PWD" >> $GITHUB_ENV elif [[ ${{ github.event_name }} == 'pull_request' ]]; then echo "trigger: a pull request" fi - #- name: Debugging with tmate - # uses: mxschmitt/action-tmate@v3.18 - name: Build conda Linux packages run: |- cd habitat-sim/conda-build @@ -252,7 +250,8 @@ jobs: export PATH=$HOME/anaconda/bin:$PATH # Delete old nightly builds - #python common/delete_old_night_packages.py --username $CONDA_USERNAME --password $CONDA_PWD + #NOTE: The ${{ env.NIGHTLY }} == "--nightly" variable is necessary to trigger this + #python common/delete_old_night_packages.py --username ${{ env.CONDA_USERNAME }} --password ${{ env.CONDA_PWD }} ${{ env.NIGHTLY }} fi #install Docker @@ -268,5 +267,76 @@ jobs: if [[ ${{ env.CI_TEST }} ]]; then docker run --ipc=host --rm -v $(pwd)/../../:/remote hsim_condabuild_dcontainer /bin/bash -c "source ~/.bashrc && conda activate py39 && cd /remote/habitat-sim/ && git config --global --add safe.directory '*' && cd /remote/habitat-sim/conda-build && python matrix_builder.py --ci_test" else - echo "TODO: the deployment command" + docker run --ipc=host --rm -v $(pwd)/../../:/remote --env ${{ env.CONDA_PWD }} hsim_condabuild_dcontainer /bin/bash -c "source ~/.bashrc && conda activate py39 && cd /remote/habitat-sim/ && git config --global --add safe.directory '*' && cd /remote/habitat-sim/conda-build && yes | anaconda login --username ${{ env.CONDA_USERNAME }} --password ${{ env.CONDA_PWD }} --hostname "aihabitat-conda-ci-builder-linux" && python matrix_builder.py --conda_upload ${{ env.NIGHTLY }}" + fi + + build_conda_osx: + runs-on: macos-14 + env: + AIHABITAT_CONDA_USERNAME: aihabitat + AIHABITAT_CONDA_PWD: ${{ secrets.AIHABITAT_CONDA_PWD }} + AIHABITAT_NIGHTLY_CONDA_USERNAME: aihabitat-nightly + AIHABITAT_NIGHTLY_CONDA_PWD: ${{ secrets.AIHABITAT_NIGHTLY_CONDA_PWD }} + defaults: + run: + shell: bash -el {0} + steps: + - uses: actions/checkout@v4.1.1 + with: + path: "./habitat-sim" + - name: Conda Install OSX + run: |- + curl -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Miniconda3-py310_24.1.2-0-MacOSX-arm64.sh + chmod +x ~/miniconda.sh + ~/miniconda.sh -b -p $HOME/miniconda + rm ~/miniconda.sh + export PATH=$HOME/miniconda/bin:$PATH + conda init "$(basename "${SHELL}")" + - name: Set CI_TEST variable based on "main merge" vs. "pull_request" workflow + run: |- + echo "NIGHTLY=''" >> $GITHUB_ENV + echo "CI_TEST='true'" >> $GITHUB_ENV + if [[ ${{ github.event_name }} == 'push' ]]; then + if [[ ${GITHUB_REF} == refs/heads/* ]]; then + echo "trigger: a push to main branch" + elif [[ ${GITHUB_REF} == refs/tags/* ]]; then + echo "trigger: a version tag push" + echo "CI_TEST='false'" >> $GITHUB_ENV + echo "CONDA_USERNAME=$AIHABITAT_CONDA_USERNAME" >> $GITHUB_ENV + echo "CONDA_PWD=$AIHABITAT_CONDA_PWD" >> $GITHUB_ENV + fi + elif [[ ${{ github.event_name }} == 'schedule' ]]; then + echo "trigger: a nightly build" + echo "CI_TEST='false'" >> $GITHUB_ENV + echo "NIGHTLY='--nightly'" >> $GITHUB_ENV + echo "CONDA_USERNAME=$AIHABITAT_NIGHTLY_CONDA_USERNAME" >> $GITHUB_ENV + echo "CONDA_PWD=$AIHABITAT_NIGHTLY_CONDA_PWD" >> $GITHUB_ENV + elif [[ ${{ github.event_name }} == 'pull_request' ]]; then + echo "trigger: a pull request" + fi + - name: Build conda OSX packages + run: |- + export PATH=$HOME/miniconda/bin:$PATH + source ~/.bash_profile + conda activate + conda install -y anaconda-client ccache cmake git ninja conda-build pip + echo $(which -a python) + pip install gitpython + cd habitat-sim + git submodule update --init --recursive --jobs 8 + pip install . + pip uninstall -y habitat-sim + rm -rf build + (yes || true) | anaconda login --username ${{ env.CONDA_USERNAME }} --password ${{ env.CONDA_PWD }} --hostname "aihabitat-conda-ci-builder-macos" + #pivot on the build type + if [[ ${{ env.CI_TEST }} ]]; then + echo "This is a CI test." + cd conda-build + export PYTHONIOENCODING="utf-8" + python matrix_builder.py --ci_test + else + conda config --set anaconda_upload yes + cd conda-build + export PYTHONIOENCODING="utf-8" + python matrix_builder.py ${{ env.NIGHTLY }} fi From e679379ce415c518fe6491599961f5f91f6aa4bd Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Thu, 21 Nov 2024 11:36:01 -0800 Subject: [PATCH 67/85] try setting up python 3.9 before osx install --- .github/workflows/install_and_test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index a0add34ea1..dfdbc91266 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -284,6 +284,10 @@ jobs: - uses: actions/checkout@v4.1.1 with: path: "./habitat-sim" + - name: Setup python + uses: actions/setup-python@v5.0.0 + with: + python-version: '3.9.16' - name: Conda Install OSX run: |- curl -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Miniconda3-py310_24.1.2-0-MacOSX-arm64.sh From 67de84c7866ca208d35f826ba7f9ed45d9b6530a Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Thu, 21 Nov 2024 11:37:51 -0800 Subject: [PATCH 68/85] use 3.9.20 for arm64 compat --- .github/workflows/install_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index dfdbc91266..ef2ce4b2d6 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -287,7 +287,7 @@ jobs: - name: Setup python uses: actions/setup-python@v5.0.0 with: - python-version: '3.9.16' + python-version: '3.9.20' - name: Conda Install OSX run: |- curl -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Miniconda3-py310_24.1.2-0-MacOSX-arm64.sh From 5ddf6baa54759051c5b06b62211c6ea861a54866 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Thu, 21 Nov 2024 11:41:54 -0800 Subject: [PATCH 69/85] use python 3.9.13 for arm64 darwin compat --- .github/workflows/install_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index ef2ce4b2d6..e1b32b0e82 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -287,7 +287,7 @@ jobs: - name: Setup python uses: actions/setup-python@v5.0.0 with: - python-version: '3.9.20' + python-version: '3.9.13' - name: Conda Install OSX run: |- curl -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Miniconda3-py310_24.1.2-0-MacOSX-arm64.sh From 9ff4abfa60ac2aaf638765c707cb43f965212fb2 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Thu, 21 Nov 2024 11:58:25 -0800 Subject: [PATCH 70/85] install miniconda with python 3.9 --- .github/workflows/install_and_test.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index e1b32b0e82..7dc0d25d26 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -284,18 +284,17 @@ jobs: - uses: actions/checkout@v4.1.1 with: path: "./habitat-sim" + - name: Setup miniconda + uses: conda-incubator/setup-miniconda@v3 + with: + miniconda-version: "latest" + python-version: "3.9" + activate-environment: "habitat" - name: Setup python uses: actions/setup-python@v5.0.0 with: python-version: '3.9.13' - - name: Conda Install OSX - run: |- - curl -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Miniconda3-py310_24.1.2-0-MacOSX-arm64.sh - chmod +x ~/miniconda.sh - ~/miniconda.sh -b -p $HOME/miniconda - rm ~/miniconda.sh - export PATH=$HOME/miniconda/bin:$PATH - conda init "$(basename "${SHELL}")" + # check compatible versions for "darwin" "arm64" here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json - name: Set CI_TEST variable based on "main merge" vs. "pull_request" workflow run: |- echo "NIGHTLY=''" >> $GITHUB_ENV @@ -322,7 +321,7 @@ jobs: run: |- export PATH=$HOME/miniconda/bin:$PATH source ~/.bash_profile - conda activate + conda activate habitat conda install -y anaconda-client ccache cmake git ninja conda-build pip echo $(which -a python) pip install gitpython From a19853637005811194d86341ee3b3283c4532027 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Thu, 21 Nov 2024 13:01:01 -0800 Subject: [PATCH 71/85] add ssh debugging to figure out the python issue --- .github/workflows/install_and_test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 7dc0d25d26..b9aaaf5ebf 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -317,6 +317,8 @@ jobs: elif [[ ${{ github.event_name }} == 'pull_request' ]]; then echo "trigger: a pull request" fi + - name: Debugging with tmate + uses: mxschmitt/action-tmate@v3.18 - name: Build conda OSX packages run: |- export PATH=$HOME/miniconda/bin:$PATH From 8f46c787a105ee681664ce783d17c082f905940f Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Thu, 21 Nov 2024 13:31:17 -0800 Subject: [PATCH 72/85] remove the ssh and try conda init --- .github/workflows/install_and_test.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index b9aaaf5ebf..77feaebc48 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -290,11 +290,6 @@ jobs: miniconda-version: "latest" python-version: "3.9" activate-environment: "habitat" - - name: Setup python - uses: actions/setup-python@v5.0.0 - with: - python-version: '3.9.13' - # check compatible versions for "darwin" "arm64" here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json - name: Set CI_TEST variable based on "main merge" vs. "pull_request" workflow run: |- echo "NIGHTLY=''" >> $GITHUB_ENV @@ -317,12 +312,12 @@ jobs: elif [[ ${{ github.event_name }} == 'pull_request' ]]; then echo "trigger: a pull request" fi - - name: Debugging with tmate - uses: mxschmitt/action-tmate@v3.18 + #- name: Debugging with tmate + # uses: mxschmitt/action-tmate@v3.18 - name: Build conda OSX packages run: |- export PATH=$HOME/miniconda/bin:$PATH - source ~/.bash_profile + conda init conda activate habitat conda install -y anaconda-client ccache cmake git ninja conda-build pip echo $(which -a python) From ca25eb1ab8a964fb3b642b906897e722976ba1f6 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Thu, 21 Nov 2024 13:52:42 -0800 Subject: [PATCH 73/85] always need a username/password --- .github/workflows/install_and_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 77feaebc48..a2975035b3 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -294,14 +294,14 @@ jobs: run: |- echo "NIGHTLY=''" >> $GITHUB_ENV echo "CI_TEST='true'" >> $GITHUB_ENV + echo "CONDA_USERNAME=$AIHABITAT_CONDA_USERNAME" >> $GITHUB_ENV + echo "CONDA_PWD=$AIHABITAT_CONDA_PWD" >> $GITHUB_ENV if [[ ${{ github.event_name }} == 'push' ]]; then if [[ ${GITHUB_REF} == refs/heads/* ]]; then echo "trigger: a push to main branch" elif [[ ${GITHUB_REF} == refs/tags/* ]]; then echo "trigger: a version tag push" echo "CI_TEST='false'" >> $GITHUB_ENV - echo "CONDA_USERNAME=$AIHABITAT_CONDA_USERNAME" >> $GITHUB_ENV - echo "CONDA_PWD=$AIHABITAT_CONDA_PWD" >> $GITHUB_ENV fi elif [[ ${{ github.event_name }} == 'schedule' ]]; then echo "trigger: a nightly build" From e4fabb800c33048762d0466363fd61a745216bab Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Thu, 21 Nov 2024 14:49:35 -0800 Subject: [PATCH 74/85] move test data download to action file, add start of lab build job, try removing some "fluff" from testing to see if necessary --- .github/actions/download_test_data/action.yml | 21 ++++++ .github/workflows/install_and_test.yml | 72 +++++++++++++------ 2 files changed, 73 insertions(+), 20 deletions(-) create mode 100644 .github/actions/download_test_data/action.yml diff --git a/.github/actions/download_test_data/action.yml b/.github/actions/download_test_data/action.yml new file mode 100644 index 0000000000..fa2ab39d32 --- /dev/null +++ b/.github/actions/download_test_data/action.yml @@ -0,0 +1,21 @@ +name: download_test_data +runs: + using: composite + steps: + - name: download_test_data + run: | + # Disable clone protection for git lfs + export GIT_CLONE_PROTECTION_ACTIVE=false + + git --version + git-lfs --version + export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH + conda init + source ~/.bashrc + conda activate habitat + conda install -y gitpython git-lfs + cd habitat-sim + git lfs install + python src_python/habitat_sim/utils/datasets_download.py --uids ci_test_assets ycb rearrange_dataset_v2 --replace --data-path data/ --no-prune + ls -la data/scene_datasets/habitat-test-scenes/ + shell: bash -el {0} diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index a2975035b3..181f207123 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -71,7 +71,7 @@ jobs: - name: run mypy run: mypy - install_and_test_ubuntu: + install_and_test_sim_ubuntu: runs-on: 4-core-ubuntu-gpu-t4 env: FPS_THRESHOLD: 900 @@ -89,33 +89,18 @@ jobs: - name: Build, install habitat-sim run: |- #give cmake ownership to the runner for installation - sudo chown runner -R /opt/cmake312/ + #sudo chown runner -R /opt/cmake312/ #activate conda env export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH - conda init - source ~/.bashrc + #conda init + #source ~/.bashrc conda activate habitat #install habitat-sim cd habitat-sim pip install -r requirements.txt --progress-bar off git submodule update --init --recursive --jobs 8 python -u setup.py install --build-type "Release" --lto --headless --bullet - - name: Download test data - run: |- - # Disable clone protection for git lfs - export GIT_CLONE_PROTECTION_ACTIVE=false - - git --version - git-lfs --version - export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH - conda init - source ~/.bashrc - conda activate habitat - conda install -y gitpython git-lfs - cd habitat-sim - git lfs install - python src_python/habitat_sim/utils/datasets_download.py --uids ci_test_assets ycb rearrange_dataset_v2 --replace --data-path data/ --no-prune - ls -la data/scene_datasets/habitat-test-scenes/ + - uses: "./habitat-sim/.github/actions/download_test_data" - name: Run sim benchmark run: |- export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH @@ -196,6 +181,53 @@ jobs: #- name: Debugging with tmate # uses: mxschmitt/action-tmate@v3.18 + install_and_test_lab_ubuntu: + runs-on: 4-core-ubuntu-gpu-t4 + defaults: + run: + shell: bash -el {0} + steps: + - uses: actions/checkout@v4.1.1 + with: + path: "./habitat-sim" + - uses: "./habitat-sim/.github/actions/install_ubuntu_deps" + - uses: "./habitat-sim/.github/actions/install_ubuntu_gpu_deps" + - name: Build, install habitat-sim + run: |- + #give cmake ownership to the runner for installation + sudo chown runner -R /opt/cmake312/ + #activate conda env + export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH + conda init + source ~/.bashrc + conda activate habitat + #install habitat-sim + cd habitat-sim + pip install -r requirements.txt --progress-bar off + git submodule update --init --recursive --jobs 8 + python -u setup.py install --build-type "Release" --lto --headless --bullet + - uses: "./habitat-sim/.github/actions/download_test_data" + - name: Build habitat-sim and docs + run: |- + export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH + conda activate habitat + cd habitat-sim + pip install -r requirements.txt --progress-bar off + git submodule update --init --recursive --jobs 8 + pip install imageio imageio-ffmpeg + conda install -y -c conda-forge doxygen=1.9.5 + conda install -y jinja2 pygments docutils + sudo apt install --allow-change-held-packages \ + texlive-base \ + texlive-latex-extra \ + texlive-fonts-extra \ + texlive-fonts-recommended + # Rebuild with all options enabled + ./build.sh --with-cuda --with-bullet + cd docs + git submodule update --init + ./build-public.sh + build_conda_binaries: runs-on: 4-core-ubuntu-gpu-t4 env: From 0c5dee313f36fcc2e9bd0628058e840261e4c878 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Thu, 21 Nov 2024 15:06:58 -0800 Subject: [PATCH 75/85] add back the cmake permissions call --- .github/workflows/install_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 181f207123..e96d9df88e 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -89,7 +89,7 @@ jobs: - name: Build, install habitat-sim run: |- #give cmake ownership to the runner for installation - #sudo chown runner -R /opt/cmake312/ + sudo chown runner -R /opt/cmake312/ #activate conda env export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH #conda init From 644c027a11ee4cb19f6ff1c9d5ad812a18af7590 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Thu, 21 Nov 2024 15:32:38 -0800 Subject: [PATCH 76/85] add --yes --- .github/workflows/install_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index e96d9df88e..0269b97b0f 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -217,7 +217,7 @@ jobs: pip install imageio imageio-ffmpeg conda install -y -c conda-forge doxygen=1.9.5 conda install -y jinja2 pygments docutils - sudo apt install --allow-change-held-packages \ + sudo apt install --yes --allow-change-held-packages \ texlive-base \ texlive-latex-extra \ texlive-fonts-extra \ From 0dcd196d604af868c2902f0d4bb13734e37bf2a8 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Thu, 21 Nov 2024 19:32:50 -0800 Subject: [PATCH 77/85] add the rest of the lab testing blocks --- .github/workflows/install_and_test.yml | 38 ++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 0269b97b0f..9c59c5db11 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -227,6 +227,44 @@ jobs: cd docs git submodule update --init ./build-public.sh + - name: Install Habitat Sim and Habitat Lab + run: |- + export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH + conda activate habitat + cd habitat-sim + #Rebuild headless + python setup.py install --headless --with-bullet --with-cuda + cd .. + if [ ! -d ./habitat-lab ] + then + git clone -q --depth 1 https://github.com/facebookresearch/habitat-lab.git + fi + cd habitat-lab + pip install -r habitat-lab/requirements.txt --progress-bar off + ln -s ../habitat-sim/data data + touch $HOME/miniconda/pip_deps_installed + - name: Run Habitat Lab tests + run: |- + export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH + conda activate habitat + cd habitat-lab + pip install -e habitat-lab + pip install -e habitat-baselines + export PYTHONPATH=.:$PYTHONPATH + export MULTI_PROC_OFFSET=0 && export MAGNUM_LOG=quiet && export HABITAT_SIM_LOG=quiet + python -m pytest + - name: Build Habitat Lab documentation + run: |- + export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH + conda activate habitat + cd habitat-lab + # Install requirments first to avoid errors related to gym + pip install -r habitat-lab/requirements.txt --progress-bar off + pip install -e habitat-lab + cd docs + conda install -y -c conda-forge doxygen=1.9.5 + conda install -y jinja2 pygments docutils + ./build-public.sh build_conda_binaries: runs-on: 4-core-ubuntu-gpu-t4 From ae01cd057b3b33f271e60cd7dec9dd0159b5bd77 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 22 Nov 2024 06:31:57 -1000 Subject: [PATCH 78/85] remove the touch command --- .github/workflows/install_and_test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 9c59c5db11..5f32b923e5 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -242,7 +242,6 @@ jobs: cd habitat-lab pip install -r habitat-lab/requirements.txt --progress-bar off ln -s ../habitat-sim/data data - touch $HOME/miniconda/pip_deps_installed - name: Run Habitat Lab tests run: |- export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH From 3a2c6f330cb32da90976fa9a73862d8fb1f3d535 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 22 Nov 2024 09:12:20 -1000 Subject: [PATCH 79/85] add doc deployment step --- .github/workflows/install_and_test.yml | 33 ++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 5f32b923e5..9373f03d16 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -264,6 +264,39 @@ jobs: conda install -y -c conda-forge doxygen=1.9.5 conda install -y jinja2 pygments docutils ./build-public.sh + -name: deploy updated docs + run: |- + if [[ ${{ github.event_name }} == 'schedule' ]]; then + echo "Trigger: a nightly build. Deploying the docs." + git clone git@github.com:facebookmicrosites/habitat-website.git + cd habitat-website + git submodule update --init + for dir in habitat-sim habitat-lab + do + rm -rf published/docs/${dir} + cp -r ../habitat-sim/build/docs-public/${dir} published/docs/. + done + + git config --global user.name "Habitat" + git config --global user.email habitat@fb.com + NOW=$(date +"%m-%d-%Y") + git add . + git diff-index --quiet HEAD || git commit -m "Build habitat-sim and habitat-lab ${NOW}" + git push origin main + + # Deploy to public + git checkout gh-pages + git checkout main published + sudo apt-get update || true + sudo apt-get install -yq rsync + rsync -a published/ ./. + rm -rf published + git add . + git diff-index --quiet HEAD || git commit -m "Build habitat-sim and habitat-lab ${NOW}" + git push origin gh-pages + else + echo "Not a nightly build, no deployment needed." + fi build_conda_binaries: runs-on: 4-core-ubuntu-gpu-t4 From 95676335d3603e711501481871358f6163cd7140 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 22 Nov 2024 09:46:42 -1000 Subject: [PATCH 80/85] try to fix odd yaml issue --- .github/workflows/install_and_test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 9373f03d16..044eaf6c23 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -264,8 +264,9 @@ jobs: conda install -y -c conda-forge doxygen=1.9.5 conda install -y jinja2 pygments docutils ./build-public.sh - -name: deploy updated docs + - name: Deploy documentation run: |- + echo "Deploy documentation" if [[ ${{ github.event_name }} == 'schedule' ]]; then echo "Trigger: a nightly build. Deploying the docs." git clone git@github.com:facebookmicrosites/habitat-website.git From 6dfc86d0051bbfa60af806acae8d5db87e6d1269 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Mon, 25 Nov 2024 09:26:09 -0800 Subject: [PATCH 81/85] cleanup --- .github/workflows/install_and_test.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 044eaf6c23..7f2fd804c5 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -92,8 +92,6 @@ jobs: sudo chown runner -R /opt/cmake312/ #activate conda env export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH - #conda init - #source ~/.bashrc conda activate habitat #install habitat-sim cd habitat-sim @@ -104,8 +102,6 @@ jobs: - name: Run sim benchmark run: |- export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH - conda init - source ~/.bashrc conda activate habitat cd habitat-sim python examples/example.py --scene data/scene_datasets/habitat-test-scenes/van-gogh-room.glb --silent --test_fps_regression $FPS_THRESHOLD @@ -115,8 +111,6 @@ jobs: sudo chown runner -R /opt/cmake312/ #activate conda env export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH - conda init - source ~/.bashrc conda activate habitat cd habitat-sim export PYTHONPATH=$(pwd):$PYTHONPATH @@ -138,14 +132,11 @@ jobs: PYTHONPATH=src_python pytest -m sim_benchmarks #re-build without bullet and cuda and run physics tests again - #TODO: instead of reinstall, do this with configuration ./build.sh --headless --cmake-args='-DCMAKE_CXX_FLAGS="--coverage"' PYTHONPATH=src_python pytest -n 4 --durations=10 --cov-report=xml --cov=./ --cov-append tests/test_physics.py tests/test_sensors.py - name: upload test coverage run: |- export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH - conda init - source ~/.bashrc conda activate habitat cd habitat-sim @@ -168,8 +159,6 @@ jobs: #give cmake ownership to the runner for installation sudo chown runner -R /opt/cmake312/ export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH - conda init - source ~/.bashrc conda activate habitat cd habitat-sim pip install -r requirements.txt --progress-bar off @@ -198,8 +187,6 @@ jobs: sudo chown runner -R /opt/cmake312/ #activate conda env export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH - conda init - source ~/.bashrc conda activate habitat #install habitat-sim cd habitat-sim From b7f7c6126baae73d06121bda1f6be6bea8e78072 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Mon, 25 Nov 2024 09:40:32 -0800 Subject: [PATCH 82/85] try to fix downgrade issue in nvidia packages --- .github/actions/install_ubuntu_gpu_deps/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/install_ubuntu_gpu_deps/action.yml b/.github/actions/install_ubuntu_gpu_deps/action.yml index 3e0eac0aa4..dedfa056fe 100644 --- a/.github/actions/install_ubuntu_gpu_deps/action.yml +++ b/.github/actions/install_ubuntu_gpu_deps/action.yml @@ -19,6 +19,6 @@ runs: sudo apt-get install -y nvidia-gds-${CUDA_VERSION} sudo apt-get install -y libnvidia-common-${UBUNTU_PACKAGE_SUFFIX} sudo apt-get install -y libnvidia-gl-${UBUNTU_PACKAGE_SUFFIX} - sudo apt-get install -y libnvidia-compute-${UBUNTU_PACKAGE_SUFFIX} + sudo apt-get install -y libnvidia-compute-${UBUNTU_PACKAGE_SUFFIX} --allow-downgrades sudo apt-get install -y libnvidia-decode-${UBUNTU_PACKAGE_SUFFIX} sudo apt-get install -y libnvidia-encode-${UBUNTU_PACKAGE_SUFFIX} From 70f6ce3cbd874859f645b886a42d96280ebabb31 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Mon, 25 Nov 2024 10:30:51 -0800 Subject: [PATCH 83/85] address reviews: try streamlined cmake install, remove some comments --- .../actions/install_ubuntu_deps/action.yml | 21 ++++++------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/.github/actions/install_ubuntu_deps/action.yml b/.github/actions/install_ubuntu_deps/action.yml index 34474444c6..06d193c236 100644 --- a/.github/actions/install_ubuntu_deps/action.yml +++ b/.github/actions/install_ubuntu_deps/action.yml @@ -9,11 +9,12 @@ runs: echo $(date +%F) > ./date echo $(git ls-remote https://github.com/facebookresearch/habitat-lab.git HEAD | awk '{ print $1}') > ./hablab_sha cat ./hablab_sha - wget https://cmake.org/files/v3.12/cmake-3.12.4-Linux-x86_64.sh - sudo mkdir /opt/cmake312 - sudo sh ./cmake-3.12.4-Linux-x86_64.sh --prefix=/opt/cmake312 --skip-license - sudo ln -s /opt/cmake312/bin/cmake /usr/local/bin/cmake - sudo ln -s /opt/cmake312/bin/ctest /usr/local/bin/ctest + #wget https://cmake.org/files/v3.12/cmake-3.12.4-Linux-x86_64.sh + #sudo mkdir /opt/cmake312 + #sudo sh ./cmake-3.12.4-Linux-x86_64.sh --prefix=/opt/cmake312 --skip-license + #sudo ln -s /opt/cmake312/bin/cmake /usr/local/bin/cmake + #sudo ln -s /opt/cmake312/bin/ctest /usr/local/bin/ctest + sudo apt install -y cmake==3.12.4 shell: bash - name: Install dependencies run: |- @@ -40,16 +41,6 @@ runs: libomp-dev \ unzip || true shell: bash - # - name: Install cuda - # run: |- - # echo "Install cuda" - # wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb - # sudo dpkg -i cuda-keyring_1.1-1_all.deb - # sudo apt-get update - # sudo apt-get -y install cuda-toolkit-12-3 - # touch ~/cuda_installed - # if command -v nvidia-smi; then nvidia-smi; fi - # shell: bash - name: Setup miniconda uses: conda-incubator/setup-miniconda@v3.0.1 with: From b7f1f2ac7d99e0e19b7c96d79def9397660ae3dc Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Mon, 25 Nov 2024 10:39:18 -0800 Subject: [PATCH 84/85] revert to previous cmake install style --- .github/actions/install_ubuntu_deps/action.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/actions/install_ubuntu_deps/action.yml b/.github/actions/install_ubuntu_deps/action.yml index 06d193c236..089f43236e 100644 --- a/.github/actions/install_ubuntu_deps/action.yml +++ b/.github/actions/install_ubuntu_deps/action.yml @@ -9,12 +9,11 @@ runs: echo $(date +%F) > ./date echo $(git ls-remote https://github.com/facebookresearch/habitat-lab.git HEAD | awk '{ print $1}') > ./hablab_sha cat ./hablab_sha - #wget https://cmake.org/files/v3.12/cmake-3.12.4-Linux-x86_64.sh - #sudo mkdir /opt/cmake312 - #sudo sh ./cmake-3.12.4-Linux-x86_64.sh --prefix=/opt/cmake312 --skip-license - #sudo ln -s /opt/cmake312/bin/cmake /usr/local/bin/cmake - #sudo ln -s /opt/cmake312/bin/ctest /usr/local/bin/ctest - sudo apt install -y cmake==3.12.4 + wget https://cmake.org/files/v3.12/cmake-3.12.4-Linux-x86_64.sh + sudo mkdir /opt/cmake312 + sudo sh ./cmake-3.12.4-Linux-x86_64.sh --prefix=/opt/cmake312 --skip-license + sudo ln -s /opt/cmake312/bin/cmake /usr/local/bin/cmake + sudo ln -s /opt/cmake312/bin/ctest /usr/local/bin/ctest shell: bash - name: Install dependencies run: |- From 1ee62e980530feaab8f7b8faa2641d559d71376e Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Mon, 25 Nov 2024 11:41:38 -0800 Subject: [PATCH 85/85] trigger another build attempt --- .github/workflows/install_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 7f2fd804c5..21db52ad7a 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -283,7 +283,7 @@ jobs: git diff-index --quiet HEAD || git commit -m "Build habitat-sim and habitat-lab ${NOW}" git push origin gh-pages else - echo "Not a nightly build, no deployment needed." + echo "Not a nightly build, no deployment needed. " fi build_conda_binaries: