From 04bdd885ef8df375f3deae112b33814f0e1dab85 Mon Sep 17 00:00:00 2001 From: Alexander Clegg Date: Thu, 6 Oct 2022 12:10:55 -0700 Subject: [PATCH] [bugfix] Support habitat-lab requirements.txt after split (#1890) * Habitat-lab requirements.txt has been moved to habitat-lab/habitat-lab/ directory * update requirements path in colab installer * change install from setup.py to pip * install mock manually in CI --- .circleci/config.yml | 17 ++++++++++------- examples/colab_utils/colab_install.sh | 5 ++--- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4d7c4f760c..c68d55ee84 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -124,8 +124,8 @@ commands: # For whatever reason we have to install pytorch first. If it isn't # it installs the 1.4 cpuonly version. Which is no good. conda install -q -y pytorch torchvision cudatoolkit=11.3 -c pytorch - conda install -q -y -c conda-forge ninja numpy pytest pytest-cov ccache hypothesis - pip install pytest-sugar pytest-xdist pytest-benchmark opencv-python cython + conda install -q -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 fi - run: name: Install emscripten @@ -439,7 +439,7 @@ jobs: git clone -q --depth 1 https://github.com/facebookresearch/habitat-lab.git fi cd habitat-lab - pip install -r requirements.txt --progress-bar off + pip install -r habitat-lab/requirements.txt --progress-bar off ln -s ../habitat-sim/data data touch ~/miniconda/pip_deps_installed - run: @@ -448,8 +448,11 @@ jobs: command: | export PATH=$HOME/miniconda/bin:$PATH . activate habitat; cd habitat-lab - python -u setup.py develop --all - python -u setup.py test + 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 - save_cache: key: habitat-lab-{{ checksum "./hablab_sha" }} background: true @@ -461,8 +464,8 @@ jobs: export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH . activate habitat; cd habitat-lab # Install requirments first to avoid errors related to gym - pip install -r requirements.txt --progress-bar off - python setup.py develop --all + pip install -r habitat-lab/requirements.txt --progress-bar off + pip install -e habitat-lab cd docs conda install -y -c conda-forge doxygen diff --git a/examples/colab_utils/colab_install.sh b/examples/colab_utils/colab_install.sh index 159ecca650..a513d718c4 100644 --- a/examples/colab_utils/colab_install.sh +++ b/examples/colab_utils/colab_install.sh @@ -43,12 +43,11 @@ git clone https://github.com/facebookresearch/habitat-sim --depth 1 #Install Requirements. cd /content/habitat-lab/ set +e -pip install -r ./requirements.txt +pip install -r ./habitat-lab/requirements.txt reqs=(./habitat_baselines/**/requirements.txt) pip install "${reqs[@]/#/-r}" set -e -python setup.py develop --all -pip install . #Reinstall to trigger sys.path update +pip install -e habitat-lab cd /content/habitat-sim/ #Download Assets