Skip to content

Instantly share code, notes, and snippets.

@cnmoro
Created September 17, 2020 19:42
Show Gist options
  • Save cnmoro/9017996867a3590ecc84d6b0db4c3aa3 to your computer and use it in GitHub Desktop.
Save cnmoro/9017996867a3590ecc84d6b0db4c3aa3 to your computer and use it in GitHub Desktop.
MLFlow + Authentication
sudo apt install nginx (ubuntu)
sudo yum install nginx (rhel)
#apache2
#httpd
sudo apt install apache2-utils (ubuntu)
sudo yum install httpd-tools (rhel)
sudo htpasswd -c /etc/nginx/.htpasswd USUARIO
remove if exists: /etc/nginx/sites-enabled/default
sudo nano /etc/nginx/sites-enabled/mlflow (ubuntu)
sudo nano /etc/nginx/nginx.conf (rhel)
add:
server {
listen 7000;
server_name 127.0.0.1;
auth_basic "Admin Area";
auth_basic_user_file /etc/nginx/.htpasswd;
location / {
proxy_pass http://127.0.0.1:5000/;
include /etc/nginx/proxy_params;
proxy_redirect off;
}
}
sudo service nginx reload
sudo iptables -A INPUT -p tcp -s localhost --dport 5000 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 5000 -j DROP
# Start mlflow:
mlflow server --backend-store-uri sqlite:///backendStore.db --default-artifact-root file://$PWD/artifacts/${ARTIFACT_URI}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment