From a82ec56aae830c1ef4b57af9c0faec1aa7170789 Mon Sep 17 00:00:00 2001 From: Adriane Boyd Date: Fri, 20 May 2022 09:57:41 +0200 Subject: [PATCH] Remove cuda extras for non-linux arm in install widget (#10796) * Remove cuda extras for non-linux arm platforms in install widget * Extend cuda versions install widget * Update GPU install docs to clarify cuda --- website/docs/usage/index.md | 11 +++++------ website/src/widgets/quickstart-install.js | 4 +++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/website/docs/usage/index.md b/website/docs/usage/index.md index 54ab62467..d2aa08d73 100644 --- a/website/docs/usage/index.md +++ b/website/docs/usage/index.md @@ -129,15 +129,14 @@ machine learning library, [Thinc](https://thinc.ai). For GPU support, we've been grateful to use the work of Chainer's [CuPy](https://cupy.chainer.org) module, which provides a numpy-compatible interface for GPU arrays. -spaCy can be installed on GPU by specifying `spacy[cuda]`, `spacy[cuda90]`, -`spacy[cuda91]`, `spacy[cuda92]`, `spacy[cuda100]`, `spacy[cuda101]`, -`spacy[cuda102]`, `spacy[cuda110]`, `spacy[cuda111]` or `spacy[cuda112]`. If you -know your cuda version, using the more explicit specifier allows cupy to be -installed via wheel, saving some compilation time. The specifiers should install +spaCy can be installed for a CUDA-compatible GPU by specifying `spacy[cuda]`, +`spacy[cuda102]`, `spacy[cuda112]`, `spacy[cuda113]`, etc. If you know your +CUDA version, using the more explicit specifier allows CuPy to be installed via +wheel, saving some compilation time. The specifiers should install [`cupy`](https://cupy.chainer.org). ```bash -$ pip install -U %%SPACY_PKG_NAME[cuda92]%%SPACY_PKG_FLAGS +$ pip install -U %%SPACY_PKG_NAME[cuda113]%%SPACY_PKG_FLAGS ``` Once you have a GPU-enabled installation, the best way to activate it is to call diff --git a/website/src/widgets/quickstart-install.js b/website/src/widgets/quickstart-install.js index fbf043c7d..926d76ae3 100644 --- a/website/src/widgets/quickstart-install.js +++ b/website/src/widgets/quickstart-install.js @@ -23,6 +23,8 @@ const CUDA = { '11.2': 'cuda112', '11.3': 'cuda113', '11.4': 'cuda114', + '11.5': 'cuda115', + '11.6': 'cuda116', } const LANG_EXTRAS = ['ja'] // only for languages with models @@ -48,7 +50,7 @@ const QuickstartInstall = ({ id, title }) => { const modelExtras = train ? selectedModels.filter(m => LANG_EXTRAS.includes(m)) : [] const apple = os === 'mac' && platform === 'arm' const pipExtras = [ - hardware === 'gpu' && cuda, + (hardware === 'gpu' && (platform !== 'arm' || os === 'linux')) && cuda, train && 'transformers', train && 'lookups', apple && 'apple',