mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-13 10:00:34 +03:00
Update GPU install docs
This commit is contained in:
parent
64d0f97c67
commit
ddff7dc474
|
@ -66,8 +66,7 @@
|
|||
{ "id": 3, "title": "3.x", "checked": true }]
|
||||
},
|
||||
{ "id": "config", "title": "Configuration", "multiple": true, "options": [
|
||||
{"id": "venv", "title": "virtualenv", "help": "Use a virtual environment and install spaCy into a user directory" },
|
||||
{"id": "gpu", "title": "GPU", "help": "Run spaCy on GPU to make it faster. Requires an NVDIA graphics card with CUDA 2+. See section below for more info."}]
|
||||
{"id": "venv", "title": "virtualenv", "help": "Use a virtual environment and install spaCy into a user directory" }]
|
||||
},
|
||||
{ "id": "model", "title": "Models", "multiple": true }
|
||||
],
|
||||
|
|
|
@ -79,6 +79,13 @@ p
|
|||
python -m spacy validate
|
||||
|
||||
+h(3, "gpu") Run spaCy with GPU
|
||||
+tag experimental
|
||||
|
||||
+infobox("Important note", "⚠️")
|
||||
| The instructions below refer to installation with CUDA 8.0. In order to
|
||||
| install with CUDA 9.0, set the environment variable #[code CUDA9=1]
|
||||
| before installing Thinc. You'll also need to adjust the path to the
|
||||
| CUDA runtime.
|
||||
|
||||
p
|
||||
| As of v2.0, spaCy's comes with neural network models that are implemented
|
||||
|
@ -93,11 +100,11 @@ p
|
|||
| CUDA. Finally, install spaCy.
|
||||
|
||||
+code(false, "bash").
|
||||
export CUDA_HOME=/usr/local/cuda-8.0 # Or wherever your CUDA is
|
||||
export CUDA_HOME=/usr/local/cuda-8.0 # or wherever your CUDA is
|
||||
export PATH=$PATH:$CUDA_HOME/bin
|
||||
|
||||
pip install spacy
|
||||
python -c "import thinc.neural.gpu_ops" # Check the GPU ops were built
|
||||
python -c "import thinc.neural.gpu_ops" # check the GPU ops were built
|
||||
|
||||
+h(3, "source") Compile from source
|
||||
|
||||
|
|
|
@ -11,9 +11,6 @@
|
|||
+qs({config: 'venv', os: 'linux'}) source .env/bin/activate
|
||||
+qs({config: 'venv', os: 'windows'}) .env\Scripts\activate
|
||||
|
||||
+qs({config: 'gpu', os: 'mac'}) export PATH=$PATH:/usr/local/cuda-8.0/bin
|
||||
+qs({config: 'gpu', os: 'linux'}) export PATH=$PATH:/usr/local/cuda-8.0/bin
|
||||
|
||||
+qs({package: 'pip'}) pip install -U spacy
|
||||
+qs({package: 'conda'}) conda install -c conda-forge spacy
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user