Installing MFlow R API in your Virtual Machine

To use MLflow R API in your Linux Virtual Machine, you will need to unset the proxy. This will also allow you to perform POST requests to the localhost.

If you encounter any issues unsetting the proxy or running MLflow, then please submit a Service Desk request.

Using the R console

When using R console on the Virtual Machine, you can unset the proxy by running:

Sys.unsetenv("http_proxy")
Sys.unsetenv("https_proxy")

Using the terminal

Alternatively, if you are using the terminal you can turn off the proxy by running:

export http_proxy=""
export https_proxy=""

Unset the proxy permanently

A more permanent fix is to add the relevant urls (localhost,127.0.0.1) to a variable called no_proxy. This can be set for a user by running:

echo "export no_proxy=localhost,127.0.0.1,$no_proxy" >> ~/.bashrc

However, this needs to be run by each individual user on a Virtual Machine. This can then be imported into R automatically by running the following command:

echo "no_proxy=Sys.getenv('no_proxy')" | sudo tee -a /etc/R/Renviron.site 

This last command only needs to be run once as the /etc/R/Renviron.site file is shared between all users.

Updated on August 31, 2023

Was this article helpful?