-
Notifications
You must be signed in to change notification settings - Fork 51
Installation
nmtpytorch
currently requires python>=3.6
, torch==0.3.1
and a GPU to work.
We are not planning to support Python 2.x but it will be updated to work with the
newer versions of torch
and also on CPU.
You can install nmtpytorch
from PyPI
using pip
(or pip3
depending on your
operating system and environment):
$ pip install nmtpytorch
This will automatically fetch and install the dependencies as well. For the torch
dependency it will specifically install the torch 0.3.1
package from PyPI
that
ships CUDA 8.0
within. If instead you want to use a newer version of CUDA
,
you can uninstall the torch
package manually afterwards and install another 0.3.1
package from here.
We provide an environment.yml
file in the repository that you can use to create
a ready-to-use anaconda environment for nmtpytorch
:
$ conda update --all
$ git clone https://github.com/lium-lst/nmtpytorch.git
$ conda env create -f nmtpytorch/environment.yml
Unlike the pip
method, this environment explicitly installs the CUDA 9.0
version of torch 0.3.1
and enables editable mode similar to the development
mode explained below.
For continuous development and testing, it is sufficient to run python setup.py develop
in the root folder of your GIT checkout. From now on, all modifications to the source
tree are directly taken into account without requiring reinstallation.
After the above installation steps, you finally need to run nmtpy-install-extra
in order to fetch and store METEOR related files in your ${HOME}/.nmtpy
folder.
This step is only required once.
nmtpytorch is developed in Informatics Lab / Le Mans University - France