Các lệnh cài đặt server OpenNMT

Code: Default 01/03/2021 06:49

Các lệnh cài đặt server OpenNMT

$ git clone https://github.com/OpenNMT/OpenNMT-py.git
$ cd OpenNMT-py/

$ sudo apt purge -y python2.7-minimal
$ sudo ln -s /usr/bin/python3 /usr/bin/python
$ sudo apt install -y python3-pip
$ python --version
$ sudo ln -s /usr/bin/pip3 /usr/bin/pip

$ python setup.py install

$ pip install PyYaml
$ pip install -r requirements.opt.txt

$ pip install torch
$ pip install cmake
$ pip install --upgrade pip
$ pip install pkg-config
$ pip install sentencepiece
$ pip install OpenNMT-py

$ onmt_translate -model available_models/Vn_Kr_train_step_100000.pt -src test.vn -output kq_translate.kr -gpu 0 -verbose

Tham khảo thêm: https://opennmt.net/OpenNMT-py/