SpaCy: Difference between revisions

Jump to navigation Jump to search
minor language and format changes
m (Fixed module python version)
(minor language and format changes)
Line 7: Line 7:


= Installation = <!--T:26-->
= Installation = <!--T:26-->
==Latest available wheels==
==Latest available wheels==
To see the latest version of <tt>spaCy</tt> that we have built:
To see the latest version of <tt>spaCy</tt> that we have built:
{{Command|avail_wheels spacy thinc thinc_gpu_ops}}
{{Command|avail_wheels spacy thinc thinc_gpu_ops}}
Line 17: Line 19:
The preferred option is to install it using the python [https://pythonwheels.com/ wheel] that we compile, as follows:  
The preferred option is to install it using the python [https://pythonwheels.com/ wheel] that we compile, as follows:  
:1. Load python 3.6 module: <tt>python/3.6</tt>
:1. Load python 3.6 module: <tt>python/3.6</tt>
:2. Create and start a [[Python#Creating_and_using_a_virtual_environment|virtual environment]].
:2. Create and activate a [[Python#Creating_and_using_a_virtual_environment|virtual environment]].
:3. Install <tt>spaCy</tt> in the virtual environment with <code>pip install</code>. For both GPU and CPU support:
:3. Install <tt>spaCy</tt> in the virtual environment with <code>pip install</code>. For both GPU and CPU support:
:{{Command|prompt=(venv) [name@server ~]|pip install spacy[cuda] --no-index}}
:{{Command|prompt=(venv) [name@server ~]|pip install spacy[cuda] --no-index}}
Line 24: Line 26:


<!--T:30-->
<!--T:30-->
'''GPU version''': for the moment, you need to point out where the CUDA libraries live:
'''GPU version''': At the present time, in order to use the GPU version you need to add the CUDA libraries to LD_LIBRARY_PATH:
{{Commands
{{Commands
|prompt=(venv) [name@server ~]
|prompt=(venv) [name@server ~]
Line 32: Line 34:


<!--T:29-->
<!--T:29-->
'''Note''': if you want to use <tt>thinc</tt> [https://docs.computecanada.ca/wiki/PyTorch Pytorch] wrapper, you'll also need to install <tt>torch_cpu</tt> or  <tt>torch_gpu</tt> wheel.
If you want to use the <tt>thinc</tt> wrapper for [https://docs.computecanada.ca/wiki/PyTorch Pytorch], you'll also need to install <tt>torch_cpu</tt> or  <tt>torch_gpu</tt> from a wheel.


</translate>
</translate>
Bureaucrats, cc_docs_admin, cc_staff
2,879

edits

Navigation menu