I built a docker image which uses ctranslate2 models in the server. I configured the entrypoint to execute onmt_server. I works perfectly.
The question is, for production purposes, should I configure Apache to serve the onmt_server? I guess I need Apache or similar to run it in production… Should I configure Apache inside the docker?
Thanks
Thanks for your answer. However, I do not have any issues when configuring Apache to host the server. My problem is configuring Apache2 inside the docker to host the server.
[Thu Nov 19 12:02:46.084823 2020] [wsgi:error] [pid 9:tid 140573004527360] Pre-loading model 100
[Thu Nov 19 12:02:46.089834 2020] [wsgi:error] [pid 9:tid 140573004527360] [2020-11-19 12:02:46,089 INFO] Loading tokenizer
nvidia-smi command is not showing anything about the server. It is not loaded
If I run the wsgi script, then it works:
Pre-loading model 100
[2020-11-19 12:05:24,009 INFO] Loading tokenizer
[2020-11-19 12:05:24,074 INFO] Loading model 100
Performed a dummy translation to initialize the model ([[-2.4049062728881836]], [['a']])
Serving on http://0.0.0.0:5000