Before starting the project, please ensure your system meet the below prerequisite.
-
Docker installed before running this app. Please run the below command to verify Docker is installed in your system
docker --version
If it is not installed, please refer to this Docker installation guide.
-
Greenplum (version 7) database is up and running
- Download the source code from Github
git clone https://github.com/minmindu/streamlit-chatbot-greenplum-telco.git
- Go to the project repository
cd streamlit-chatbot-greenplum-telco
- Open the app.py file and change the database credential if required
vim app.py
Change this section: postgres://<db-user>:<password>@<db-ip>:<db-port>/<databasename>
- Build the docker image. The below command is to build a docker image with name streamline-chatbot-greenplum with the latest version
docker build -t streamlit-chatbot-greenplum-telco .
- Verify image
streamlit-chatbot-greenplum-telco
is built successfully
docker images
- Run the docker image streamlit-chatbot-greenplum-telco
docker run -p 8501:8501 streamlit-chatbot-greenplum-telco
- Go to the browser and open the web link.
Note: the IP address is the IP that your VM / local env uses. For example,
http://35.189.1.42:8501
Please refer to this blog for detailed explaination and use case.