diff --git a/.circleci/config.in.yml b/.circleci/config.in.yml index deba4aef..d0a163f1 100644 --- a/.circleci/config.in.yml +++ b/.circleci/config.in.yml @@ -55,7 +55,7 @@ binary_common: &binary_common wheel_docker_image: description: "Wheel only: what docker image to use" type: string - default: "pytorch/manylinux-cuda102" + default: "pytorch/manylinux-cuda101" environment: PYTHON_VERSION: << parameters.python_version >> BUILD_VERSION: << parameters.build_version >> diff --git a/.circleci/config.yml b/.circleci/config.yml index feca131b..75e5c78e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -55,7 +55,7 @@ binary_common: &binary_common wheel_docker_image: description: "Wheel only: what docker image to use" type: string - default: "pytorch/manylinux-cuda102" + default: "pytorch/manylinux-cuda101" environment: PYTHON_VERSION: << parameters.python_version >> BUILD_VERSION: << parameters.build_version >> @@ -371,18 +371,18 @@ workflows: python_version: '3.8' pytorch_version: 1.6.0 - binary_linux_wheel: - cu_version: cu102 - name: linux_wheel_py36_cu102_pyt160 + cu_version: cu101 + name: linux_wheel_py36_cu101_pyt160 python_version: '3.6' pytorch_version: 1.6.0 - binary_linux_wheel: - cu_version: cu102 - name: linux_wheel_py37_cu102_pyt160 + cu_version: cu101 + name: linux_wheel_py37_cu101_pyt160 python_version: '3.7' pytorch_version: 1.6.0 - binary_linux_wheel: - cu_version: cu102 - name: linux_wheel_py38_cu102_pyt160 + cu_version: cu101 + name: linux_wheel_py38_cu101_pyt160 python_version: '3.8' pytorch_version: 1.6.0 - binary_linux_conda_cuda: diff --git a/.circleci/regenerate.py b/.circleci/regenerate.py index 1fd1fe74..547aa3dc 100755 --- a/.circleci/regenerate.py +++ b/.circleci/regenerate.py @@ -39,7 +39,7 @@ def workflows(prefix="", filter_branch=None, upload=False, indentation=6): ) for btype in ["wheel"]: for python_version in ["3.6", "3.7", "3.8"]: - for cu_version in ["cu102"]: + for cu_version in ["cu101"]: w += workflow_pair( btype=btype, python_version=python_version, diff --git a/docs/tutorials/README.md b/docs/tutorials/README.md new file mode 100644 index 00000000..e3c999ab --- /dev/null +++ b/docs/tutorials/README.md @@ -0,0 +1,18 @@ +# Tutorial notebooks + +For current versions of the tutorials, which correspond to the latest release, +please look at this directory at the `stable` tag, namely at +https://github.com/facebookresearch/pytorch3d/tree/stable/docs/tutorials . + +There are links at the project homepage for opening these directly in colab. + +They install torch, torchvision and PyTorch3D from pip, which should work +with the CUDA 10.1 inside a GPU colab notebook. If you need to install +pytorch3d from source inside colab, you can use +`!pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'` +instead. + +The versions of these tutorials on the main branch may need to use the latest +pytorch3d from the main branch. You may be able to install this from source +with +`!pip install 'git+https://github.com/facebookresearch/pytorch3d.git'`. diff --git a/docs/tutorials/bundle_adjustment.ipynb b/docs/tutorials/bundle_adjustment.ipynb index 256d6856..e5dfe700 100644 --- a/docs/tutorials/bundle_adjustment.ipynb +++ b/docs/tutorials/bundle_adjustment.ipynb @@ -81,7 +81,11 @@ "outputs": [], "source": [ "!pip install torch torchvision\n", - "!pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'" + "import sys\n", + "if torch.__version__=='1.6.0+cu101' and sys.platform.startswith('linux'):\n", + " !pip install pytorch3d\n", + "else:\n", + " !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'" ] }, { diff --git a/docs/tutorials/camera_position_optimization_with_differentiable_rendering.ipynb b/docs/tutorials/camera_position_optimization_with_differentiable_rendering.ipynb index 2a953db4..bf9216a4 100644 --- a/docs/tutorials/camera_position_optimization_with_differentiable_rendering.ipynb +++ b/docs/tutorials/camera_position_optimization_with_differentiable_rendering.ipynb @@ -68,7 +68,11 @@ "outputs": [], "source": [ "!pip install torch torchvision\n", - "!pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'" + "import sys\n", + "if torch.__version__=='1.6.0+cu101' and sys.platform.startswith('linux'):\n", + " !pip install pytorch3d\n", + "else:\n", + " !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'" ] }, { diff --git a/docs/tutorials/dataloaders_ShapeNetCore_R2N2.ipynb b/docs/tutorials/dataloaders_ShapeNetCore_R2N2.ipynb index 2e48c9b4..8d7e6e49 100644 --- a/docs/tutorials/dataloaders_ShapeNetCore_R2N2.ipynb +++ b/docs/tutorials/dataloaders_ShapeNetCore_R2N2.ipynb @@ -43,7 +43,11 @@ "outputs": [], "source": [ "!pip install torch torchvision\n", - "!pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'" + "import sys\n", + "if torch.__version__=='1.6.0+cu101' and sys.platform.startswith('linux'):\n", + " !pip install pytorch3d\n", + "else:\n", + " !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'" ] }, { diff --git a/docs/tutorials/deform_source_mesh_to_target_mesh.ipynb b/docs/tutorials/deform_source_mesh_to_target_mesh.ipynb index 8986e05b..030cad59 100644 --- a/docs/tutorials/deform_source_mesh_to_target_mesh.ipynb +++ b/docs/tutorials/deform_source_mesh_to_target_mesh.ipynb @@ -82,7 +82,11 @@ "outputs": [], "source": [ "!pip install torch torchvision\n", - "!pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'" + "import sys\n", + "if torch.__version__=='1.6.0+cu101' and sys.platform.startswith('linux'):\n", + " !pip install pytorch3d\n", + "else:\n", + " !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'" ] }, { diff --git a/docs/tutorials/fit_textured_mesh.ipynb b/docs/tutorials/fit_textured_mesh.ipynb index f57cd1aa..3c4c8250 100644 --- a/docs/tutorials/fit_textured_mesh.ipynb +++ b/docs/tutorials/fit_textured_mesh.ipynb @@ -60,7 +60,11 @@ "outputs": [], "source": [ "!pip install torch torchvision\n", - "!pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'" + "import sys\n", + "if torch.__version__=='1.6.0+cu101' and sys.platform.startswith('linux'):\n", + " !pip install pytorch3d\n", + "else:\n", + " !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'" ] }, { @@ -781,7 +785,7 @@ " new_src_mesh = src_mesh.offset_verts(deform_verts)\n", " \n", " # Add per vertex colors to texture the mesh\n", - " new_src_mesh.textures = TexturesVertex(verts_rgb=sphere_verts_rgb) \n", + " new_src_mesh.textures = TexturesVertex(verts_features=sphere_verts_rgb) \n", " \n", " # Losses to smooth /regularize the mesh shape\n", " loss = {k: torch.tensor(0.0, device=device) for k in losses}\n", diff --git a/docs/tutorials/render_colored_points.ipynb b/docs/tutorials/render_colored_points.ipynb index 0adbd8d7..bab57376 100644 --- a/docs/tutorials/render_colored_points.ipynb +++ b/docs/tutorials/render_colored_points.ipynb @@ -42,7 +42,11 @@ "outputs": [], "source": [ "!pip install torch torchvision\n", - "!pip install 'git+https://github.com/facebookresearch/pytorch3d.git'" + "import sys\n", + "if torch.__version__=='1.6.0+cu101' and sys.platform.startswith('linux'):\n", + " !pip install pytorch3d\n", + "else:\n", + " !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'" ] }, { diff --git a/docs/tutorials/render_textured_meshes.ipynb b/docs/tutorials/render_textured_meshes.ipynb index fac10281..6dca1a3d 100644 --- a/docs/tutorials/render_textured_meshes.ipynb +++ b/docs/tutorials/render_textured_meshes.ipynb @@ -65,7 +65,11 @@ "outputs": [], "source": [ "!pip install torch torchvision\n", - "!pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'" + "import sys\n", + "if torch.__version__=='1.6.0+cu101' and sys.platform.startswith('linux'):\n", + " !pip install pytorch3d\n", + "else:\n", + " !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'" ] }, {