mirror of
				https://github.com/facebookresearch/pytorch3d.git
				synced 2025-11-04 18:02:14 +08:00 
			
		
		
		
	safer pip install in doc
Summary: Add --no-cache and --no-index to all commands which try to download wheels from S3, to avoid hitting pypi. Reviewed By: nikhilaravi Differential Revision: D33507975 fbshipit-source-id: ee796e43cc1864e475cd73c248e9900487012f25
This commit is contained in:
		
							parent
							
								
									45d096e219
								
							
						
					
					
						commit
						174738c33e
					
				@ -87,9 +87,9 @@ pip install pytorch3d
 | 
			
		||||
We have prebuilt wheels with CUDA for Linux for PyTorch 1.10.0, for each of the CUDA versions that they support,
 | 
			
		||||
for Python 3.7, 3.8 and 3.9.
 | 
			
		||||
These are installed in a special way.
 | 
			
		||||
For example, to install for Python 3.8, PyTorch 1.9.0 and CUDA 10.2
 | 
			
		||||
For example, to install for Python 3.8, PyTorch 1.10.0 and CUDA 10.2
 | 
			
		||||
```
 | 
			
		||||
pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py38_cu102_pyt1100/download.html
 | 
			
		||||
pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py38_cu102_pyt1100/download.html
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
In general, from inside IPython, or in Google Colab or a jupyter notebook, you can install with
 | 
			
		||||
@ -102,7 +102,7 @@ version_str="".join([
 | 
			
		||||
    torch.version.cuda.replace(".",""),
 | 
			
		||||
    f"_pyt{pyt_version_str}"
 | 
			
		||||
])
 | 
			
		||||
!pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html
 | 
			
		||||
!pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Building / installing from source.
 | 
			
		||||
 | 
			
		||||
@ -97,7 +97,8 @@
 | 
			
		||||
    "            torch.version.cuda.replace(\".\",\"\"),\n",
 | 
			
		||||
    "            f\"_pyt{pyt_version_str}\"\n",
 | 
			
		||||
    "        ])\n",
 | 
			
		||||
    "        !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
 | 
			
		||||
    "        !pip install fvcore iopath\n",
 | 
			
		||||
    "        !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",
 | 
			
		||||
 | 
			
		||||
@ -84,7 +84,8 @@
 | 
			
		||||
    "            torch.version.cuda.replace(\".\",\"\"),\n",
 | 
			
		||||
    "            f\"_pyt{pyt_version_str}\"\n",
 | 
			
		||||
    "        ])\n",
 | 
			
		||||
    "        !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
 | 
			
		||||
    "        !pip install fvcore iopath\n",
 | 
			
		||||
    "        !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",
 | 
			
		||||
 | 
			
		||||
@ -59,7 +59,8 @@
 | 
			
		||||
    "            torch.version.cuda.replace(\".\",\"\"),\n",
 | 
			
		||||
    "            f\"_pyt{pyt_version_str}\"\n",
 | 
			
		||||
    "        ])\n",
 | 
			
		||||
    "        !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
 | 
			
		||||
    "        !pip install fvcore iopath\n",
 | 
			
		||||
    "        !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",
 | 
			
		||||
 | 
			
		||||
@ -98,7 +98,8 @@
 | 
			
		||||
    "            torch.version.cuda.replace(\".\",\"\"),\n",
 | 
			
		||||
    "            f\"_pyt{pyt_version_str}\"\n",
 | 
			
		||||
    "        ])\n",
 | 
			
		||||
    "        !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
 | 
			
		||||
    "        !pip install fvcore iopath\n",
 | 
			
		||||
    "        !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",
 | 
			
		||||
 | 
			
		||||
@ -64,7 +64,8 @@
 | 
			
		||||
    "            torch.version.cuda.replace(\".\",\"\"),\n",
 | 
			
		||||
    "            f\"_pyt{pyt_version_str}\"\n",
 | 
			
		||||
    "        ])\n",
 | 
			
		||||
    "        !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
 | 
			
		||||
    "        !pip install fvcore iopath\n",
 | 
			
		||||
    "        !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",
 | 
			
		||||
 | 
			
		||||
@ -76,7 +76,8 @@
 | 
			
		||||
    "            torch.version.cuda.replace(\".\",\"\"),\n",
 | 
			
		||||
    "            f\"_pyt{pyt_version_str}\"\n",
 | 
			
		||||
    "        ])\n",
 | 
			
		||||
    "        !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
 | 
			
		||||
    "        !pip install fvcore iopath\n",
 | 
			
		||||
    "        !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",
 | 
			
		||||
 | 
			
		||||
@ -55,7 +55,8 @@
 | 
			
		||||
    "            torch.version.cuda.replace(\".\",\"\"),\n",
 | 
			
		||||
    "            f\"_pyt{pyt_version_str}\"\n",
 | 
			
		||||
    "        ])\n",
 | 
			
		||||
    "        !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
 | 
			
		||||
    "        !pip install fvcore iopath\n",
 | 
			
		||||
    "        !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",
 | 
			
		||||
 | 
			
		||||
@ -58,7 +58,8 @@
 | 
			
		||||
    "            torch.version.cuda.replace(\".\",\"\"),\n",
 | 
			
		||||
    "            f\"_pyt{pyt_version_str}\"\n",
 | 
			
		||||
    "        ])\n",
 | 
			
		||||
    "        !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
 | 
			
		||||
    "        !pip install fvcore iopath\n",
 | 
			
		||||
    "        !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",
 | 
			
		||||
 | 
			
		||||
@ -65,7 +65,8 @@
 | 
			
		||||
    "            torch.version.cuda.replace(\".\",\"\"),\n",
 | 
			
		||||
    "            f\"_pyt{pyt_version_str}\"\n",
 | 
			
		||||
    "        ])\n",
 | 
			
		||||
    "        !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
 | 
			
		||||
    "        !pip install fvcore iopath\n",
 | 
			
		||||
    "        !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",
 | 
			
		||||
 | 
			
		||||
@ -81,7 +81,8 @@
 | 
			
		||||
    "            torch.version.cuda.replace(\".\",\"\"),\n",
 | 
			
		||||
    "            f\"_pyt{pyt_version_str}\"\n",
 | 
			
		||||
    "        ])\n",
 | 
			
		||||
    "        !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
 | 
			
		||||
    "        !pip install fvcore iopath\n",
 | 
			
		||||
    "        !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",
 | 
			
		||||
 | 
			
		||||
@ -26,5 +26,5 @@ version_str="".join([
 | 
			
		||||
    torch.version.cuda.replace(".",""),
 | 
			
		||||
    f"_pyt{pyt_version_str}"
 | 
			
		||||
])
 | 
			
		||||
!pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html
 | 
			
		||||
!pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user