Skip to content

Commit 174738c

Browse files
bottlerfacebook-github-bot
authored andcommitted
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
1 parent 45d096e commit 174738c

12 files changed

+24
-14
lines changed

INSTALL.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ pip install pytorch3d
8787
We have prebuilt wheels with CUDA for Linux for PyTorch 1.10.0, for each of the CUDA versions that they support,
8888
for Python 3.7, 3.8 and 3.9.
8989
These are installed in a special way.
90-
For example, to install for Python 3.8, PyTorch 1.9.0 and CUDA 10.2
90+
For example, to install for Python 3.8, PyTorch 1.10.0 and CUDA 10.2
9191
```
92-
pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py38_cu102_pyt1100/download.html
92+
pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py38_cu102_pyt1100/download.html
9393
```
9494

9595
In general, from inside IPython, or in Google Colab or a jupyter notebook, you can install with
@@ -102,7 +102,7 @@ version_str="".join([
102102
torch.version.cuda.replace(".",""),
103103
f"_pyt{pyt_version_str}"
104104
])
105-
!pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html
105+
!pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html
106106
```
107107

108108
## Building / installing from source.

docs/tutorials/bundle_adjustment.ipynb

+2-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@
9797
" torch.version.cuda.replace(\".\",\"\"),\n",
9898
" f\"_pyt{pyt_version_str}\"\n",
9999
" ])\n",
100-
" !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
100+
" !pip install fvcore iopath\n",
101+
" !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
101102
" else:\n",
102103
" # We try to install PyTorch3D from source.\n",
103104
" !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",

docs/tutorials/camera_position_optimization_with_differentiable_rendering.ipynb

+2-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@
8484
" torch.version.cuda.replace(\".\",\"\"),\n",
8585
" f\"_pyt{pyt_version_str}\"\n",
8686
" ])\n",
87-
" !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
87+
" !pip install fvcore iopath\n",
88+
" !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
8889
" else:\n",
8990
" # We try to install PyTorch3D from source.\n",
9091
" !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",

docs/tutorials/dataloaders_ShapeNetCore_R2N2.ipynb

+2-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@
5959
" torch.version.cuda.replace(\".\",\"\"),\n",
6060
" f\"_pyt{pyt_version_str}\"\n",
6161
" ])\n",
62-
" !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
62+
" !pip install fvcore iopath\n",
63+
" !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
6364
" else:\n",
6465
" # We try to install PyTorch3D from source.\n",
6566
" !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",

docs/tutorials/deform_source_mesh_to_target_mesh.ipynb

+2-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@
9898
" torch.version.cuda.replace(\".\",\"\"),\n",
9999
" f\"_pyt{pyt_version_str}\"\n",
100100
" ])\n",
101-
" !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
101+
" !pip install fvcore iopath\n",
102+
" !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
102103
" else:\n",
103104
" # We try to install PyTorch3D from source.\n",
104105
" !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",

docs/tutorials/fit_simple_neural_radiance_field.ipynb

+2-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@
6464
" torch.version.cuda.replace(\".\",\"\"),\n",
6565
" f\"_pyt{pyt_version_str}\"\n",
6666
" ])\n",
67-
" !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
67+
" !pip install fvcore iopath\n",
68+
" !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
6869
" else:\n",
6970
" # We try to install PyTorch3D from source.\n",
7071
" !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",

docs/tutorials/fit_textured_mesh.ipynb

+2-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@
7676
" torch.version.cuda.replace(\".\",\"\"),\n",
7777
" f\"_pyt{pyt_version_str}\"\n",
7878
" ])\n",
79-
" !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
79+
" !pip install fvcore iopath\n",
80+
" !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
8081
" else:\n",
8182
" # We try to install PyTorch3D from source.\n",
8283
" !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",

docs/tutorials/fit_textured_volume.ipynb

+2-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@
5555
" torch.version.cuda.replace(\".\",\"\"),\n",
5656
" f\"_pyt{pyt_version_str}\"\n",
5757
" ])\n",
58-
" !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
58+
" !pip install fvcore iopath\n",
59+
" !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
5960
" else:\n",
6061
" # We try to install PyTorch3D from source.\n",
6162
" !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",

docs/tutorials/render_colored_points.ipynb

+2-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@
5858
" torch.version.cuda.replace(\".\",\"\"),\n",
5959
" f\"_pyt{pyt_version_str}\"\n",
6060
" ])\n",
61-
" !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
61+
" !pip install fvcore iopath\n",
62+
" !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
6263
" else:\n",
6364
" # We try to install PyTorch3D from source.\n",
6465
" !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",

docs/tutorials/render_densepose.ipynb

+2-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@
6565
" torch.version.cuda.replace(\".\",\"\"),\n",
6666
" f\"_pyt{pyt_version_str}\"\n",
6767
" ])\n",
68-
" !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
68+
" !pip install fvcore iopath\n",
69+
" !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
6970
" else:\n",
7071
" # We try to install PyTorch3D from source.\n",
7172
" !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",

docs/tutorials/render_textured_meshes.ipynb

+2-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@
8181
" torch.version.cuda.replace(\".\",\"\"),\n",
8282
" f\"_pyt{pyt_version_str}\"\n",
8383
" ])\n",
84-
" !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
84+
" !pip install fvcore iopath\n",
85+
" !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
8586
" else:\n",
8687
" # We try to install PyTorch3D from source.\n",
8788
" !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",

packaging/linux_wheels/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ version_str="".join([
2626
torch.version.cuda.replace(".",""),
2727
f"_pyt{pyt_version_str}"
2828
])
29-
!pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html
29+
!pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html
3030
```

0 commit comments

Comments
 (0)