I would like to ask if I can add a custom sentiment analysis component that I have on a Docker container to my pipeline (e.g. duckling)? And how should be done this?
I need to use it via Docker due to compatibility issues as I tried to do this as the suggested way in here
Assuming you don’t need to train the component you just override the “process” method in the example and use requests to make an api call to your docker container.
I can’t solve it yet. I would like to ask one more thing. In this container, I have a flask application to do the sentiment analysis. Requests should be done to the flask or to the docker? I am not sure if there is a difference as I don’t have any experience with these.
A docker container by default has zero access to the outside world. The command/script to launch the container has to explicitly map ports in the container to ports outside. You decide what ports you want to expose; and any other applications can access those ports.