Posts

Showing posts with the label supervisord

error in deploying a sentiment analysis code with docker and testing it locally

Image
Clash Royale CLAN TAG #URR8PPP error in deploying a sentiment analysis code with docker and testing it locally Please help. I am trying to deploy a sentiment analysis code with docker and testing it locally. I am using ubuntu 16.04 I am able to run main.py in one terminal and get the prediction using another terminal using the curl command "curl -H "Content-Type: application/json" -X POST -d '{"Sentences": ["i like programming"] }' http://localhost:8080" But when I build and test this locally using docker with the same curl command (with port 8081). I get this error. $ docker build -t sentiment-service . $ docker run -it --rm -p 8081:80 sentiment-service Please help to resolve this error, so that I can get predictions when deployed locally using docker with curl command as shown in first image The directory structure is main.py from flask import Flask, current_app, request, jsonify import io import tensorflow as tf import pickle import gc...