From 513a6476bc41c7f5a26c77bd585b68026b643cde Mon Sep 17 00:00:00 2001 From: Jeremy Reizenstein Date: Thu, 24 Dec 2020 10:14:37 -0800 Subject: [PATCH] iopath dependency Summary: Add ioPath as a dependency of PyTorch3D in preparation for using the new PathManager. Reviewed By: nikhilaravi Differential Revision: D25372971 fbshipit-source-id: d8aa661d2de975e747dd494edc42bf843990cf68 --- .circleci/config.in.yml | 1 + .circleci/config.yml | 1 + INSTALL.md | 3 ++- dev/run_tutorials.sh | 2 +- docs/requirements.txt | 1 + packaging/build_conda.sh | 2 +- packaging/pytorch3d/meta.yaml | 1 + setup.py | 2 +- 8 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.circleci/config.in.yml b/.circleci/config.in.yml index 26442ebc..44b85008 100644 --- a/.circleci/config.in.yml +++ b/.circleci/config.in.yml @@ -75,6 +75,7 @@ jobs: # - run: conda install -c pytorch pytorch torchvision - run: pip3 install --progress-bar off 'git+https://github.com/facebookresearch/fvcore' + - run: pip3 install --progress-bar off 'git+https://github.com/facebookresearch/iopath' - run: name: get cub command: | diff --git a/.circleci/config.yml b/.circleci/config.yml index f9b6630e..4bfe692e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -75,6 +75,7 @@ jobs: # - run: conda install -c pytorch pytorch torchvision - run: pip3 install --progress-bar off 'git+https://github.com/facebookresearch/fvcore' + - run: pip3 install --progress-bar off 'git+https://github.com/facebookresearch/iopath' - run: name: get cub command: | diff --git a/INSTALL.md b/INSTALL.md index f57959ae..138c990a 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -13,6 +13,7 @@ The core library is written in PyTorch. Several components have underlying imple - torchvision that matches the PyTorch installation. You can install them together as explained at pytorch.org to make sure of this. - gcc & g++ ≥ 4.9 - [fvcore](https://github.com/facebookresearch/fvcore) +- [ioPath](https://github.com/facebookresearch/iopath) - If CUDA is to be used, use a version which is supported by the corresponding pytorch version and at least version 9.2. - If CUDA is to be used and you are building from source, the CUB library must be available. We recommend version 1.10.0. @@ -21,7 +22,7 @@ The runtime dependencies can be installed by running: conda create -n pytorch3d python=3.8 conda activate pytorch3d conda install -c pytorch pytorch=1.7.0 torchvision cudatoolkit=10.2 -conda install -c conda-forge -c fvcore fvcore +conda install -c conda-forge fvcore iopath ``` For the CUB build time dependency, if you are using conda, you can continue with diff --git a/dev/run_tutorials.sh b/dev/run_tutorials.sh index 1abf4207..26395426 100644 --- a/dev/run_tutorials.sh +++ b/dev/run_tutorials.sh @@ -19,7 +19,7 @@ conda init bash source ~/.bashrc conda create -y -n myenv python=3.8 matplotlib ipython ipywidgets nbconvert conda activate myenv -conda install -y -c conda-forge fvcore +conda install -y -c conda-forge fvcore iopath conda install -y -c pytorch pytorch=1.6.0 cudatoolkit=10.1 torchvision conda install -y -c pytorch3d-nightly pytorch3d pip install plotly scikit-image diff --git a/docs/requirements.txt b/docs/requirements.txt index a014045c..853f1d93 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -6,5 +6,6 @@ sphinx_markdown_tables mock numpy git+git://github.com/facebookresearch/fvcore.git +git+git://github.com/facebookresearch/iopath.git https://download.pytorch.org/whl/cpu/torchvision-0.8.2%2Bcpu-cp37-cp37m-linux_x86_64.whl https://download.pytorch.org/whl/cpu/torch-1.7.1%2Bcpu-cp37-cp37m-linux_x86_64.whl diff --git a/packaging/build_conda.sh b/packaging/build_conda.sh index ef50a95e..096abe1f 100755 --- a/packaging/build_conda.sh +++ b/packaging/build_conda.sh @@ -17,4 +17,4 @@ setup_conda_pytorch_constraint setup_conda_cudatoolkit_constraint setup_visual_studio_constraint # shellcheck disable=SC2086 -conda build $CONDA_CHANNEL_FLAGS ${TEST_FLAG:-} -c bottler -c defaults -c conda-forge --no-anaconda-upload -c fvcore --python "$PYTHON_VERSION" packaging/pytorch3d +conda build $CONDA_CHANNEL_FLAGS ${TEST_FLAG:-} -c bottler -c defaults -c conda-forge --no-anaconda-upload --python "$PYTHON_VERSION" packaging/pytorch3d diff --git a/packaging/pytorch3d/meta.yaml b/packaging/pytorch3d/meta.yaml index f7f853ad..202f83ef 100644 --- a/packaging/pytorch3d/meta.yaml +++ b/packaging/pytorch3d/meta.yaml @@ -22,6 +22,7 @@ requirements: - numpy >=1.11 - torchvision >=0.5 - fvcore + - iopath {{ environ.get('CONDA_PYTORCH_CONSTRAINT') }} {{ environ.get('CONDA_CUDATOOLKIT_CONSTRAINT') }} diff --git a/setup.py b/setup.py index b9925893..f3add4b4 100755 --- a/setup.py +++ b/setup.py @@ -109,7 +109,7 @@ setup( description="PyTorch3D is FAIR's library of reusable components " "for deep Learning with 3D data.", packages=find_packages(exclude=("configs", "tests", "tests.*")), - install_requires=["torchvision>=0.4", "fvcore"], + install_requires=["torchvision>=0.4", "fvcore", "iopath"], extras_require={ "all": ["matplotlib", "tqdm>4.29.0", "imageio", "ipywidgets"], "dev": ["flake8", "isort", "black==19.3b0"],