1. Install Torch

2. Install additional dependencies:

luarocks install tds
luarocks install bit32 # if using LuaJIT

3. Clone the OpenNMT repository:

git clone https://github.com/OpenNMT/OpenNMT
cd OpenNMT

And you are ready to go! Take a look at the quickstart to familiarize yourself with the main training workflow.

Docker (Ubuntu)

First you need to install nvidia-docker:

wget -P /tmp https://github.com/NVIDIA/nvidia-docker/releases/download/v1.0.0-rc.3/nvidia-docker_1.0.0.rc.3-1_amd64.deb
sudo dpkg -i /tmp/nvidia-docker*.deb

If this command does not work, you may need to run the following updates:

sudo apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main'
sudo apt-get update
sudo apt-get install docker-engine nvidia-modprobe

Then simply run our Docker container:

sudo nvidia-docker run -it harvardnlp/opennmt:8.0

Once in the instance, check out the latest code:

git clone https://github.com/OpenNMT/OpenNMT

Amazon EC2

最好的办法就是通过 Docker。 我们提供一个安装了初步CUDA驱动程序的公共AMI: ami-c12f86a1. 使用此AMI启动P2 / G2 GPU实例,并运行上面提到的 nvidia-docker 命令即可开始。