Update GPU install docs

This commit is contained in:
ines 2017-11-06 19:35:36 +01:00
parent 64d0f97c67
commit ddff7dc474
3 changed files with 10 additions and 7 deletions

View File

@ -66,8 +66,7 @@
{ "id": 3, "title": "3.x", "checked": true }] { "id": 3, "title": "3.x", "checked": true }]
}, },
{ "id": "config", "title": "Configuration", "multiple": true, "options": [ { "id": "config", "title": "Configuration", "multiple": true, "options": [
{"id": "venv", "title": "virtualenv", "help": "Use a virtual environment and install spaCy into a user directory" }, {"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": "model", "title": "Models", "multiple": true } { "id": "model", "title": "Models", "multiple": true }
], ],

View File

@ -79,6 +79,13 @@ p
python -m spacy validate python -m spacy validate
+h(3, "gpu") Run spaCy with GPU +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 p
| As of v2.0, spaCy's comes with neural network models that are implemented | As of v2.0, spaCy's comes with neural network models that are implemented
@ -93,11 +100,11 @@ p
| CUDA. Finally, install spaCy. | CUDA. Finally, install spaCy.
+code(false, "bash"). +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 export PATH=$PATH:$CUDA_HOME/bin
pip install spacy 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 +h(3, "source") Compile from source

View File

@ -11,9 +11,6 @@
+qs({config: 'venv', os: 'linux'}) source .env/bin/activate +qs({config: 'venv', os: 'linux'}) source .env/bin/activate
+qs({config: 'venv', os: 'windows'}) .env\Scripts\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: 'pip'}) pip install -U spacy
+qs({package: 'conda'}) conda install -c conda-forge spacy +qs({package: 'conda'}) conda install -c conda-forge spacy