Hi all from France,
I just post my question here because despite all the existing posts on this subject I do not understand the procedure.
For a school project, I use streamlit to build a dashboard, which communicates with a Flask application. I later found that streamlit embeds the Tornado framework directly…
My configuration works well locally, but I have a lot of problems deploying it.
This is what i did :
I built a Docker image with the following files :
- API.py
- application_test.csv
- application_train.csv
- DASHBOARD.py
- Dockerfile
- logo.PNG
- requirements.txt
dashboard.py is the file containing the streamlit code
api.py is a file containing all the code with Flask. Here Flask works on port 4449
Here is the code of my Dockerfile :
# Python support can be specified down to the minor or micro version
# (e.g. 3.6 or 3.6.3).
# OS Support also exists for jessie & stretch (slim and full).
# See https://hub.docker.com/r/library/python/ for all supported Python
# tags from Docker Hub.
FROM python:3.7.6-slim-buster
# If you prefer miniconda:
#FROM continuumio/miniconda3
LABEL Name=test_azure Version=0.0.1
EXPOSE 4449
# Répeertoire de travail
WORKDIR /app
# Récupération fichiers
COPY . /app
# Using pip:
RUN python3 -m pip install -r requirements.txt
CMD ["python3", "-m", "test_azure"]
# Lance Flask
CMD ["python", "API.py"]
# Lance streamlit
CMD ["streamlit", "run", "DASHBOARD.py"]
Locally, I launch my image and I have a message telling me that streamlit is launched. Unfortunately, nothing appears in my browser at the two proposed URLs.
I am trying to configure the URL in 0.0.0.0 in order to make it public, but I do not understand the procedure.
I have to change the config.toml file but how do I do that?
Could you explain to me how to deploy my application with Docker please?
Thanks,
Regards.
Julien