JMV12
JMV12

Reputation: 1045

MLflow Tracking On EC2

I'm attempting to follow the instructions given here (https://medium.com/@alexanderneshitov/how-to-run-an-mlflow-tracking-server-on-aws-ec2-d7afd0ac8008) to test running MLflow tracker on an ec2 instance. I have done the following from the article

  1. Install mlflow on ec2
  2. Install and configure NGINX following the steps given
  3. Start mlflow server on ec2 using mlflow server --default-artifact-root s3://test.bucket.for.mlflow/ --host 0.0.0.0
  4. Access server using its public DNS

According to the article, I should see the mlflow ui when accessing with my ec2 public DNS, but all I see is the following page:

NGINX page instead of MLflow UI

Why would I be seeing this page and not the mlflow page like:

enter image description here

Upvotes: 0

Views: 2389

Answers (2)

ram_stark
ram_stark

Reputation: 1

I had the same issue and posting here for others facing the same issue. I followed the page here to create an nginx proxy

https://www.scaleway.com/en/docs/how-to-configure-nginx-reverse-proxy/

From step 2 on the link

  1. Disable the default virtual host, that is pre-configured when Nginx is installed via Ubuntu’s packet manager apt:

    unlink /etc/nginx/sites-enabled/default

  2. Enter the directory /etc/nginx/sites-available and create a reverse proxy configuration file.

    cd /etc/nginx/sites-available

    nano reverse-proxy.conf

  3. Paste the following Nginx configuration in the text editor. The proxy server redirects all incomming connections on port 80 to the MLflow server, listening on port 5000.

    server {
    
           listen 80;
           listen [::]:80;
           access_log /var/log/nginx/reverse-access.log;
           error_log /var/log/nginx/reverse-error.log;
    
           location / {
                      proxy_pass http://localhost:5000/;
                      auth_basic “Restricted Content”;
                      auth_basic_user_file /etc/nginx/.htpasswd;
           }
    }
    

Note: Accesses and errors are located in a log files at /var/log/nginx.

  1. Copy the configuration from /etc/nginx/sites-available to /etc/nginx/sites-enabled. It is recommended to use a symbolic link.

    ln -s /etc/nginx/sites-available/reverse-proxy.conf /etc/nginx/sites-enabled/reverse-proxy.conf

  2. Test the Nginx configuration file

    nginx -t

Upvotes: 0

Amey Agrawal
Amey Agrawal

Reputation: 132

you need to specify --port options while starting mlflow. The port would be 80/443.

Upvotes: 1

Related Questions