зеркало из https://github.com/microsoft/inmt.git
Fix opennmt naming changes
This commit is contained in:
Родитель
f29d10ff93
Коммит
bac1a7c870
|
@ -3,3 +3,6 @@ model/
|
||||||
db.sqlite3
|
db.sqlite3
|
||||||
pred.txt
|
pred.txt
|
||||||
conf.py
|
conf.py
|
||||||
|
build
|
||||||
|
dist
|
||||||
|
*.egg-info
|
|
@ -4,6 +4,5 @@ RUN mkdir /inmt
|
||||||
WORKDIR /inmt
|
WORKDIR /inmt
|
||||||
COPY requirements.txt /inmt/
|
COPY requirements.txt /inmt/
|
||||||
RUN pip install -r requirements.txt
|
RUN pip install -r requirements.txt
|
||||||
RUN cd OpenNMT-py
|
|
||||||
RUN python setup.py install
|
|
||||||
COPY . /inmt/
|
COPY . /inmt/
|
||||||
|
RUN python opennmt/setup.py install
|
|
@ -16,7 +16,7 @@ import ast
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
dir_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
|
dir_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
|
||||||
sys.path.insert(0, os.path.join(dir_path, 'OpenNMT-py'))
|
sys.path.insert(0, os.path.join(dir_path, 'opennmt'))
|
||||||
|
|
||||||
from itertools import repeat
|
from itertools import repeat
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ import ast
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
dir_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
|
dir_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
|
||||||
sys.path.insert(0, os.path.join(dir_path, 'OpenNMT-py'))
|
sys.path.insert(0, os.path.join(dir_path, 'opennmt'))
|
||||||
|
|
||||||
from onmt.utils.logging import init_logger
|
from onmt.utils.logging import init_logger
|
||||||
from onmt.utils.misc import split_corpus
|
from onmt.utils.misc import split_corpus
|
||||||
|
|
Загрузка…
Ссылка в новой задаче