mlflow-redisai icon indicating copy to clipboard operation
mlflow-redisai copied to clipboard

Problems connecting redisai container using mlflow-redisai library

Open juanjops opened this issue 1 year ago • 0 comments
trafficstars

Hi,

I want to deploy a model with mlflow and jupyter to redisai. The specifics of my project is that I need mlflow, jupyter notebook, and redis in different docker containers.

This is the docker-compose file

version: '3'
services:
  notebook:
    image: jupyter/base-notebook
    ports:
      - "8888:8888"
    depends_on: 
      - mlflow
      - redisai
    environment: 
      MLFLOW_TRACKING_URI: 'http://mlflow:5000'
      REDISAI_TRACKING_URI: 'https://redisai:6379'
    volumes:
      - /home/jpardo/Documents/MLops/data/mlruns:/home/jovyan/mlruns

  mlflow:
    image: burakince/mlflow
    expose: 
      - "5000"
    ports:
      - "5000:5000"
    volumes:
      - /home/jpardo/Documents/MLops/data/mlruns:/mlflow/mlruns

  redisai:
    image: redislabs/redisai
    expose: 
      - "6379"
    ports:
      - "6379:6379"

I have installed inside de notebook container mlflow_redisai and mlflow libraries.

mlflow==2.10.2
mlflow-redisai==0.1.0

When inside the notebook container I run

from mlflow.deployments import get_deploy_client 
REDISAI_TRACKING_URI = os.getenv("REDISAI_TRACKING_URI")
redisai = get_deploy_client(REDISAI_TRACKING_URI)

the error from the redisai container is

Possible SECURITY ATTACK detected. It looks like somebody is sending POST or Host: commands to Redis. This is likely due to an attacker attempting to use Cross Protocol Scripting to compromise your Redis instance. Connection aborted.

So the problem is, Why I cannot connect to the redisai container with the mlflow-redisai library? On the contrary I have no problems connecting the notebook container with the mlflow container.

Thanks for any help,

juanjops avatar Feb 10 '24 15:02 juanjops