I want to deploy a Two-container app in Azure.
My app is like this:
MLFlow container for the latest model.
Streamlit App gets the latest model to deliver predictions.
If it was only one container, it would work. But MLFlow needs its own container. So I created a docker compose. It works fine locally (with the compose below), but I just can't deploy it on Azure.
This is the docker-compose:
services:
mlflow:
build:
context: ./mlflow-server
ports:
- "5000:5000"
command: mlflow server --host 0.0.0.0 --port 5000
streamlit:
build:
context: .
ports:
- "8501:8501"
depends_on:
- mlflow
environment:
- MLFLOW_SERVER_URL=http://mlflow:5000
I pushed both containers to Azure Container Registry. First, I tried creating a Web App using the "multi-container" option, and I tried to modify the docker-compose to map the MLFlow so Streamlit can read it. Unsuccessful. I can run mlflow alone, which does not depend on anything.
I also tried to create two container instance, but then I don't know how to connect streamlit to mlflow.
Here's what I tried also to make them connect:
version: '3'
services:
mlflow:
image: crispdm.azurecr.io/crispdm-mlflow:v1
ports:
- "5000:5000"
streamlit:
image: crispdm.azurecr.io/crispdm-streamlit:v1
ports:
- "8501:8501"
depends_on:
- mlflow
environment:
- MLFLOW_SERVER_URL=/
No success... I need some help, please.
I want to deploy a Two-container app in Azure.
My app is like this:
MLFlow container for the latest model.
Streamlit App gets the latest model to deliver predictions.
If it was only one container, it would work. But MLFlow needs its own container. So I created a docker compose. It works fine locally (with the compose below), but I just can't deploy it on Azure.
This is the docker-compose:
services:
mlflow:
build:
context: ./mlflow-server
ports:
- "5000:5000"
command: mlflow server --host 0.0.0.0 --port 5000
streamlit:
build:
context: .
ports:
- "8501:8501"
depends_on:
- mlflow
environment:
- MLFLOW_SERVER_URL=http://mlflow:5000
I pushed both containers to Azure Container Registry. First, I tried creating a Web App using the "multi-container" option, and I tried to modify the docker-compose to map the MLFlow so Streamlit can read it. Unsuccessful. I can run mlflow alone, which does not depend on anything.
I also tried to create two container instance, but then I don't know how to connect streamlit to mlflow.
Here's what I tried also to make them connect:
version: '3'
services:
mlflow:
image: crispdm.azurecr.io/crispdm-mlflow:v1
ports:
- "5000:5000"
streamlit:
image: crispdm.azurecr.io/crispdm-streamlit:v1
ports:
- "8501:8501"
depends_on:
- mlflow
environment:
- MLFLOW_SERVER_URL=https://st-mlflow-g0h5eveufagrfads.canadacentral-01.azurewebsites/
No success... I need some help, please.
Share Improve this question asked Mar 17 at 23:56 gurezendegurezende 2411 silver badge10 bronze badges1 Answer
Reset to default 0I was finally able to deploy the app...but I am not sure if that's the right way to do it... but just so you know, this works.
I created an instance of the MLFlow container. Then I got the Public IP generated from that.
I went back to my local code and I added that URL from the MLFlow container running on Azure to the streamlit code as the "Tracking URI".
Then I created another docker container and redeployed it as version 2.
On Azure, I have created a new instance of the v2 streamlit app.
It worked.
It is not an HTTPS, though...no clue how to make that become a secure URL... well, keep learning.
Cheers.