Various install docs updates (#10487)

* Simplify quickstart source install to use only editable pip install

* Update pytorch install instructions to more recent versions
This commit is contained in:
Adriane Boyd 2022-03-15 11:12:50 +01:00 committed by GitHub
parent 610001e8c7
commit e8357923ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 14 deletions

View File

@ -211,23 +211,23 @@ PyTorch as a dependency below, but it may not find the best version for your
setup. setup.
```bash ```bash
### Example: Install PyTorch 1.7.1 for CUDA 10.1 with pip ### Example: Install PyTorch 1.11.0 for CUDA 11.3 with pip
# See: https://pytorch.org/get-started/locally/ # See: https://pytorch.org/get-started/locally/
$ pip install torch==1.7.1+cu101 torchvision==0.8.2+cu101 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html $ pip install torch==1.11.0+cu113 torchvision==0.12.0+cu113 torchaudio==0.11.0+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html
``` ```
Next, install spaCy with the extras for your CUDA version and transformers. The Next, install spaCy with the extras for your CUDA version and transformers. The
CUDA extra (e.g., `cuda92`, `cuda102`, `cuda111`) installs the correct version CUDA extra (e.g., `cuda102`, `cuda113`) installs the correct version of
of [`cupy`](https://docs.cupy.dev/en/stable/install.html#installing-cupy), which [`cupy`](https://docs.cupy.dev/en/stable/install.html#installing-cupy), which
is just like `numpy`, but for GPU. You may also need to set the `CUDA_PATH` is just like `numpy`, but for GPU. You may also need to set the `CUDA_PATH`
environment variable if your CUDA runtime is installed in a non-standard environment variable if your CUDA runtime is installed in a non-standard
location. Putting it all together, if you had installed CUDA 10.2 in location. Putting it all together, if you had installed CUDA 11.3 in
`/opt/nvidia/cuda`, you would run: `/opt/nvidia/cuda`, you would run:
```bash ```bash
### Installation with CUDA ### Installation with CUDA
$ export CUDA_PATH="/opt/nvidia/cuda" $ export CUDA_PATH="/opt/nvidia/cuda"
$ pip install -U %%SPACY_PKG_NAME[cuda102,transformers]%%SPACY_PKG_FLAGS $ pip install -U %%SPACY_PKG_NAME[cuda113,transformers]%%SPACY_PKG_FLAGS
``` ```
For [`transformers`](https://huggingface.co/transformers/) v4.0.0+ and models For [`transformers`](https://huggingface.co/transformers/) v4.0.0+ and models

View File

@ -214,16 +214,9 @@ const QuickstartInstall = ({ id, title }) => {
{nightly ? ` --branch ${DEFAULT_BRANCH}` : ''} {nightly ? ` --branch ${DEFAULT_BRANCH}` : ''}
</QS> </QS>
<QS package="source">cd spaCy</QS> <QS package="source">cd spaCy</QS>
<QS package="source" os="linux">
export PYTHONPATH=`pwd`
</QS>
<QS package="source" os="windows">
set PYTHONPATH=C:\path\to\spaCy
</QS>
<QS package="source">pip install -r requirements.txt</QS> <QS package="source">pip install -r requirements.txt</QS>
<QS package="source">python setup.py build_ext --inplace</QS>
<QS package="source"> <QS package="source">
pip install {train || hardware == 'gpu' ? `'.[${pipExtras}]'` : '.'} pip install --no-build-isolation --editable {train || hardware == 'gpu' ? `'.[${pipExtras}]'` : '.'}
</QS> </QS>
<QS config="train" package="conda" comment prompt={false}> <QS config="train" package="conda" comment prompt={false}>
# packages only available via pip # packages only available via pip