Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to build with docker-compose up (steps to make it working) #74

Open
Pablohn26 opened this issue Jan 28, 2023 · 0 comments
Open

Comments

@Pablohn26
Copy link

When I run docker-compose up I get the following error when running the container:

Step 15/15 : CMD ["venv/bin/python3", "server.py", "-c", "services.json", "-p", "80"]
 ---> Running in e5b5c0c67ad4
Removing intermediate container e5b5c0c67ad4
 ---> 1960cbc4b03f
Successfully built 1960cbc4b03f
Successfully tagged opus-mt_opus-mt:latest
WARNING: Image for service opus-mt was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Creating opus-mt_opus-mt_1 ... done
Attaching to opus-mt_opus-mt_1
opus-mt_1  | Traceback (most recent call last):
opus-mt_1  |   File "server.py", line 188, in <module>
opus-mt_1  |     application = make_app(args)
opus-mt_1  |   File "server.py", line 166, in make_app
opus-mt_1  |     worker_pool = initialize_workers(services)
opus-mt_1  |   File "server.py", line 148, in initialize_workers
opus-mt_1  |     source_lang, target_lang, pair_config, models[pair_config['configuration']])
opus-mt_1  |   File "server.py", line 23, in __init__
opus-mt_1  |     targetspm=self.service.get('targetspm')
opus-mt_1  |   File "/usr/src/app/content_processor.py", line 17, in __init__
opus-mt_1  |     BPEcodes = open(sourcebpe, 'r', encoding="utf-8")
opus-mt_1  | FileNotFoundError: [Errno 2] No such file or directory: './models/en-es/source.bpe'
opus-mt_1  | [2023-01-26 16:24:07] Error: File './models/en-es/decoder.yml' does not exist
opus-mt_1  | [2023-01-26 16:24:07] Error: Aborted from marian::io::InputFileStream::InputFileStream(const string&) in /usr/src/app/marian/src/common/file_stream.cpp:22
opus-mt_1  | 
opus-mt_1  | [CALL STACK]
opus-mt_1  | [0x557e88960d96]    marian::io::InputFileStream::  InputFileStream  (std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>> const&) + 0x2b6
opus-mt_1  | [0x557e8892dba2]    marian::ConfigParser::  loadConfigFiles  (std::vector<std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>>> const&) + 0x92
opus-mt_1  | [0x557e8892f29c]    marian::ConfigParser::  parseOptions  (int,  char**,  bool) + 0x1dc
opus-mt_1  | [0x557e8891fa7d]    marian::  parseOptions  (int,  char**,  marian::cli::mode,  bool) + 0x3d
opus-mt_1  | [0x557e8882dd7e]    main                                               + 0x2e
opus-mt_1  | [0x7f235f01409b]    __libc_start_main                                  + 0xeb
opus-mt_1  | [0x557e8884298a]    _start                                             + 0x2a
opus-mt_1  | 
opus-mt_opus-mt_1 exited with code 1


The error was here:

opus-mt_1  | FileNotFoundError: [Errno 2] No such file or directory: './models/en-es/source.bpe'
opus-mt_1  | [2023-01-26 16:24:07] Error: File './models/en-es/decoder.yml' does not exist

You have to download the model here and uncompress the zip file in folder models/en-es

Then, trying again, you hit the following error:

Error: File './models/en-fi/decoder.yml' does not exist

That is because default configuration includes en-es and en-fi. To fix that (removing en-fi, you have to delete here in the configuration file and here in the Makefile, removing en-fi and leaving the line as following:

tornado-models: models/en-es

Then run docker-compose up --build and it will be working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant