Site icon TestingDocs.com

Install MAX SDK on Linux

Overview

Let’s learn how to install the MAX SDK on a Linux machine. This tutorial uses the Ubuntu Linux distribution. The Modular MAX SDK is a toolkit for AI inference pipeline optimization. It includes the MAX components, API bindings for Python, C, and Mojo, and tools for benchmarking and visualizing models.

Prerequisites

Install MAX SDK

Sign in to your Modular developer account. Complete the authentication procedure.

Open a terminal and enter the following command:

$ modular auth

Launch a web browser like Chrome or Firefox. To complete the authentication, open the web page on the browser:

https://developer.modular.com/device?userCode=<code>

Verify using this code on the webpage. Enter the specified code in the text box.
<code>

Once completed, in the terminal window, issue the following command:

$ modular install max

This command will install the MAX components.

MAX Engine Python package

The next step is to install the MAX engine Python package.

$ MAX_PATH=$(modular config max.path) \
&& python3 -m pip install –find-links $MAX_PATH/wheels max-engine

 

Environment variables

Set environment variables to max and mojo CLIs.

Run the following command:

$ MAX_PATH=$(modular config max.path) \
&& BASHRC=$( [ -f “$HOME/.bash_profile” ] && echo “$HOME/.bash_profile” || echo “$HOME/.bashrc” ) \
&& echo ‘export MODULAR_HOME=”‘$HOME’/.modular”‘ >> “$BASHRC” \
&& echo ‘export PATH=”‘$MAX_PATH’/bin:$PATH”‘ >> “$BASHRC” \
&& source “$BASHRC”

That’s it. MAX has now been successfully installed on the Linux box.

More information at Modular official website:

https://www.modular.com/

Exit mobile version