mirror of
				https://github.com/facebookresearch/pytorch3d.git
				synced 2025-11-04 18:02:14 +08:00 
			
		
		
		
	update notebooks for 0.7.3
Summary: Allow pytorch2.0 download: ``` sed -i 's/startswith(\\"1.13.\\")/startswith\(\(\\"1.13.\\", \\"2.0.\\"\)\)/' *b ``` Remove lines which download and install CUB: ``` sed -i.bak '/1.10\.0/d' *b rm *.bak ``` Reviewed By: davidsonic Differential Revision: D44343299 fbshipit-source-id: e8399b5dd10068c717178ba9ffb0630bacca3253
This commit is contained in:
		
							parent
							
								
									ebdbfde0ce
								
							
						
					
					
						commit
						274b6df918
					
				@ -89,7 +89,7 @@
 | 
			
		||||
    "except ModuleNotFoundError:\n",
 | 
			
		||||
    "    need_pytorch3d=True\n",
 | 
			
		||||
    "if need_pytorch3d:\n",
 | 
			
		||||
    "    if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n",
 | 
			
		||||
    "    if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n",
 | 
			
		||||
    "        # We try to install PyTorch3D via a released wheel.\n",
 | 
			
		||||
    "        pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n",
 | 
			
		||||
    "        version_str=\"\".join([\n",
 | 
			
		||||
@ -101,9 +101,6 @@
 | 
			
		||||
    "        !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
 | 
			
		||||
    "    else:\n",
 | 
			
		||||
    "        # We try to install PyTorch3D from source.\n",
 | 
			
		||||
    "        !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",
 | 
			
		||||
    "        !tar xzf 1.10.0.tar.gz\n",
 | 
			
		||||
    "        os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n",
 | 
			
		||||
    "        !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
 | 
			
		||||
   ]
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
@ -76,7 +76,7 @@
 | 
			
		||||
    "except ModuleNotFoundError:\n",
 | 
			
		||||
    "    need_pytorch3d=True\n",
 | 
			
		||||
    "if need_pytorch3d:\n",
 | 
			
		||||
    "    if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n",
 | 
			
		||||
    "    if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n",
 | 
			
		||||
    "        # We try to install PyTorch3D via a released wheel.\n",
 | 
			
		||||
    "        pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n",
 | 
			
		||||
    "        version_str=\"\".join([\n",
 | 
			
		||||
@ -88,9 +88,6 @@
 | 
			
		||||
    "        !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
 | 
			
		||||
    "    else:\n",
 | 
			
		||||
    "        # We try to install PyTorch3D from source.\n",
 | 
			
		||||
    "        !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",
 | 
			
		||||
    "        !tar xzf 1.10.0.tar.gz\n",
 | 
			
		||||
    "        os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n",
 | 
			
		||||
    "        !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
 | 
			
		||||
   ]
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
@ -51,7 +51,7 @@
 | 
			
		||||
    "except ModuleNotFoundError:\n",
 | 
			
		||||
    "    need_pytorch3d=True\n",
 | 
			
		||||
    "if need_pytorch3d:\n",
 | 
			
		||||
    "    if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n",
 | 
			
		||||
    "    if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n",
 | 
			
		||||
    "        # We try to install PyTorch3D via a released wheel.\n",
 | 
			
		||||
    "        pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n",
 | 
			
		||||
    "        version_str=\"\".join([\n",
 | 
			
		||||
@ -63,9 +63,6 @@
 | 
			
		||||
    "        !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
 | 
			
		||||
    "    else:\n",
 | 
			
		||||
    "        # We try to install PyTorch3D from source.\n",
 | 
			
		||||
    "        !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",
 | 
			
		||||
    "        !tar xzf 1.10.0.tar.gz\n",
 | 
			
		||||
    "        os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n",
 | 
			
		||||
    "        !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
 | 
			
		||||
   ]
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
@ -90,7 +90,7 @@
 | 
			
		||||
    "except ModuleNotFoundError:\n",
 | 
			
		||||
    "    need_pytorch3d=True\n",
 | 
			
		||||
    "if need_pytorch3d:\n",
 | 
			
		||||
    "    if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n",
 | 
			
		||||
    "    if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n",
 | 
			
		||||
    "        # We try to install PyTorch3D via a released wheel.\n",
 | 
			
		||||
    "        pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n",
 | 
			
		||||
    "        version_str=\"\".join([\n",
 | 
			
		||||
@ -102,9 +102,6 @@
 | 
			
		||||
    "        !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
 | 
			
		||||
    "    else:\n",
 | 
			
		||||
    "        # We try to install PyTorch3D from source.\n",
 | 
			
		||||
    "        !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",
 | 
			
		||||
    "        !tar xzf 1.10.0.tar.gz\n",
 | 
			
		||||
    "        os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n",
 | 
			
		||||
    "        !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
 | 
			
		||||
   ]
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
@ -56,7 +56,7 @@
 | 
			
		||||
    "except ModuleNotFoundError:\n",
 | 
			
		||||
    "    need_pytorch3d=True\n",
 | 
			
		||||
    "if need_pytorch3d:\n",
 | 
			
		||||
    "    if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n",
 | 
			
		||||
    "    if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n",
 | 
			
		||||
    "        # We try to install PyTorch3D via a released wheel.\n",
 | 
			
		||||
    "        pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n",
 | 
			
		||||
    "        version_str=\"\".join([\n",
 | 
			
		||||
@ -68,9 +68,6 @@
 | 
			
		||||
    "        !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
 | 
			
		||||
    "    else:\n",
 | 
			
		||||
    "        # We try to install PyTorch3D from source.\n",
 | 
			
		||||
    "        !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",
 | 
			
		||||
    "        !tar xzf 1.10.0.tar.gz\n",
 | 
			
		||||
    "        os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n",
 | 
			
		||||
    "        !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
 | 
			
		||||
   ]
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
@ -68,7 +68,7 @@
 | 
			
		||||
    "except ModuleNotFoundError:\n",
 | 
			
		||||
    "    need_pytorch3d=True\n",
 | 
			
		||||
    "if need_pytorch3d:\n",
 | 
			
		||||
    "    if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n",
 | 
			
		||||
    "    if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n",
 | 
			
		||||
    "        # We try to install PyTorch3D via a released wheel.\n",
 | 
			
		||||
    "        pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n",
 | 
			
		||||
    "        version_str=\"\".join([\n",
 | 
			
		||||
@ -80,9 +80,6 @@
 | 
			
		||||
    "        !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
 | 
			
		||||
    "    else:\n",
 | 
			
		||||
    "        # We try to install PyTorch3D from source.\n",
 | 
			
		||||
    "        !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",
 | 
			
		||||
    "        !tar xzf 1.10.0.tar.gz\n",
 | 
			
		||||
    "        os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n",
 | 
			
		||||
    "        !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
 | 
			
		||||
   ]
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
@ -47,7 +47,7 @@
 | 
			
		||||
    "except ModuleNotFoundError:\n",
 | 
			
		||||
    "    need_pytorch3d=True\n",
 | 
			
		||||
    "if need_pytorch3d:\n",
 | 
			
		||||
    "    if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n",
 | 
			
		||||
    "    if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n",
 | 
			
		||||
    "        # We try to install PyTorch3D via a released wheel.\n",
 | 
			
		||||
    "        pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n",
 | 
			
		||||
    "        version_str=\"\".join([\n",
 | 
			
		||||
@ -59,9 +59,6 @@
 | 
			
		||||
    "        !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
 | 
			
		||||
    "    else:\n",
 | 
			
		||||
    "        # We try to install PyTorch3D from source.\n",
 | 
			
		||||
    "        !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",
 | 
			
		||||
    "        !tar xzf 1.10.0.tar.gz\n",
 | 
			
		||||
    "        os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n",
 | 
			
		||||
    "        !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
 | 
			
		||||
   ]
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
@ -78,7 +78,7 @@
 | 
			
		||||
        "except ModuleNotFoundError:\n",
 | 
			
		||||
        "    need_pytorch3d=True\n",
 | 
			
		||||
        "if need_pytorch3d:\n",
 | 
			
		||||
        "    if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n",
 | 
			
		||||
        "    if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n",
 | 
			
		||||
        "        # We try to install PyTorch3D via a released wheel.\n",
 | 
			
		||||
        "        pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n",
 | 
			
		||||
        "        version_str=\"\".join([\n",
 | 
			
		||||
@ -90,9 +90,6 @@
 | 
			
		||||
        "        !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
 | 
			
		||||
        "    else:\n",
 | 
			
		||||
        "        # We try to install PyTorch3D from source.\n",
 | 
			
		||||
        "        !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",
 | 
			
		||||
        "        !tar xzf 1.10.0.tar.gz\n",
 | 
			
		||||
        "        os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n",
 | 
			
		||||
        "        !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
 | 
			
		||||
      ]
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
@ -72,7 +72,7 @@
 | 
			
		||||
        "except ModuleNotFoundError:\n",
 | 
			
		||||
        "    need_pytorch3d=True\n",
 | 
			
		||||
        "if need_pytorch3d:\n",
 | 
			
		||||
        "    if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n",
 | 
			
		||||
        "    if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n",
 | 
			
		||||
        "        # We try to install PyTorch3D via a released wheel.\n",
 | 
			
		||||
        "        pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n",
 | 
			
		||||
        "        version_str=\"\".join([\n",
 | 
			
		||||
@ -84,9 +84,6 @@
 | 
			
		||||
        "        !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
 | 
			
		||||
        "    else:\n",
 | 
			
		||||
        "        # We try to install PyTorch3D from source.\n",
 | 
			
		||||
        "        !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",
 | 
			
		||||
        "        !tar xzf 1.10.0.tar.gz\n",
 | 
			
		||||
        "        os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n",
 | 
			
		||||
        "        !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
 | 
			
		||||
      ]
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
@ -50,7 +50,7 @@
 | 
			
		||||
    "except ModuleNotFoundError:\n",
 | 
			
		||||
    "    need_pytorch3d=True\n",
 | 
			
		||||
    "if need_pytorch3d:\n",
 | 
			
		||||
    "    if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n",
 | 
			
		||||
    "    if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n",
 | 
			
		||||
    "        # We try to install PyTorch3D via a released wheel.\n",
 | 
			
		||||
    "        pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n",
 | 
			
		||||
    "        version_str=\"\".join([\n",
 | 
			
		||||
@ -62,9 +62,6 @@
 | 
			
		||||
    "        !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
 | 
			
		||||
    "    else:\n",
 | 
			
		||||
    "        # We try to install PyTorch3D from source.\n",
 | 
			
		||||
    "        !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",
 | 
			
		||||
    "        !tar xzf 1.10.0.tar.gz\n",
 | 
			
		||||
    "        os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n",
 | 
			
		||||
    "        !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
 | 
			
		||||
   ]
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
@ -57,7 +57,7 @@
 | 
			
		||||
    "except ModuleNotFoundError:\n",
 | 
			
		||||
    "    need_pytorch3d=True\n",
 | 
			
		||||
    "if need_pytorch3d:\n",
 | 
			
		||||
    "    if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n",
 | 
			
		||||
    "    if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n",
 | 
			
		||||
    "        # We try to install PyTorch3D via a released wheel.\n",
 | 
			
		||||
    "        pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n",
 | 
			
		||||
    "        version_str=\"\".join([\n",
 | 
			
		||||
@ -69,9 +69,6 @@
 | 
			
		||||
    "        !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
 | 
			
		||||
    "    else:\n",
 | 
			
		||||
    "        # We try to install PyTorch3D from source.\n",
 | 
			
		||||
    "        !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",
 | 
			
		||||
    "        !tar xzf 1.10.0.tar.gz\n",
 | 
			
		||||
    "        os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n",
 | 
			
		||||
    "        !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
 | 
			
		||||
   ]
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
@ -73,7 +73,7 @@
 | 
			
		||||
    "except ModuleNotFoundError:\n",
 | 
			
		||||
    "    need_pytorch3d=True\n",
 | 
			
		||||
    "if need_pytorch3d:\n",
 | 
			
		||||
    "    if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n",
 | 
			
		||||
    "    if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n",
 | 
			
		||||
    "        # We try to install PyTorch3D via a released wheel.\n",
 | 
			
		||||
    "        pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n",
 | 
			
		||||
    "        version_str=\"\".join([\n",
 | 
			
		||||
@ -85,9 +85,6 @@
 | 
			
		||||
    "        !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
 | 
			
		||||
    "    else:\n",
 | 
			
		||||
    "        # We try to install PyTorch3D from source.\n",
 | 
			
		||||
    "        !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",
 | 
			
		||||
    "        !tar xzf 1.10.0.tar.gz\n",
 | 
			
		||||
    "        os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n",
 | 
			
		||||
    "        !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
 | 
			
		||||
   ]
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user