SpaCy: Difference between revisions
Jump to navigation
Jump to search
(Marked this version for translation) |
m (Minor fix on pytorch wrapper and EN grammar) |
||
Line 27: | Line 27: | ||
<!--T:30--> | <!--T:30--> | ||
'''GPU version''': At the present time, in order to use the GPU version you need to add the CUDA libraries to LD_LIBRARY_PATH: | '''GPU version''': At the present time, in order to use the GPU version you need to add the CUDA libraries to <tt>LD_LIBRARY_PATH</tt>: | ||
{{Commands | {{Commands | ||
|prompt=(venv) [name@server ~] | |prompt=(venv) [name@server ~] | ||
Line 35: | Line 35: | ||
<!--T:29--> | <!--T:29--> | ||
If you want to use the | If you want to use the [https://docs.computecanada.ca/wiki/PyTorch Pytorch] wrapper with <tt>thinc</tt>, you'll also need to install the <tt>torch_cpu</tt> or <tt>torch_gpu</tt> wheel. | ||
</translate> | </translate> |
Revision as of 18:49, 15 November 2018
spaCy is a Python package that provides industrial-strength natural language processing.
Installation
Latest available wheels
To see the latest version of spaCy that we have built:
[name@server ~]$ avail_wheels spacy thinc thinc_gpu_ops
For more information on listing wheels, see listing available wheels.
Pre-build
The preferred option is to install it using the python wheel that we compile, as follows:
- 1. Load python 3.6 module: python/3.6
- 2. Create and activate a virtual environment.
- 3. Install spaCy in the virtual environment with
pip install
. For both GPU and CPU support: -
(venv) [name@server ~] pip install spacy[cuda] --no-index
- If you only need CPU support:
-
(venv) [name@server ~] pip install spacy --no-index
GPU version: At the present time, in order to use the GPU version you need to add the CUDA libraries to LD_LIBRARY_PATH:
(venv) [name@server ~] module load gcc/5.4.0 cuda/9
(venv) [name@server ~] export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH
If you want to use the Pytorch wrapper with thinc, you'll also need to install the torch_cpu or torch_gpu wheel.