Route Optimization
The route optimization workflow features an example of how to use NVIDIA cuOpt as a managed service, with sample data and a Python thin client to show how to interact with this service and send requests to solve for routes.
This deployment guide will walk through the process of accessing the service and running the workflow, including information on the various components used, and if further customization is required.
This example is only for reference and should not be used in production deployments. Production implementations of these workflows should be customized and integrated with your Enterprise-grade infrastructure and software and should be deployed on platforms supported by NVIDIA AI Enterprise.
Each user is responsible for checking the content and the applicable licenses of third-party software and determining if they are suitable for the intended use.
To run this workflow, make sure you have accomplished steps 1-4 in the Quick Start Guide for the cuOpt cloud service. Once these steps have been completed, proceed to the environment setup steps below.
First, open a new terminal window, and activate the python virtual environment that was previously created from the Quick Start Guide.
source cuopt-service-env/bin/activate
Next, let’s install all the additional libraries and dependencies needed to run the sample notebooks.
Create a file called ‘requirements.txt’ by running the command. This will create and open a new text file in your terminal window.
nano requirements.txt
Copy and paste the following content:
jupyterlab pandas requests folium polyline scipy matplotlib wheel ipywidgets
ImportantThese are all the libraries and dependencies needed to run the workflow notebooks.
Save and exit the file.
To install everything listed in this file, run the following command:
pip install -r requirements.txt
NoteThis is equivalent to running a ‘pip install’ command for each requirement.
Download the notebooks from the NGC Catalog
Unzip the downloaded file into the current working directory.
Launch JupyterLab and run the notebooks. To do so, run the following command:
jupyter lab --ip=0.0.0.0 --no-browser --allow-root --NotebookApp.token='' --NotebookApp.base_url='/notebook/'
In your Jupyter environment, you will see the following directory:
Enter the ‘route-optimization-service’ folder to see the sample notebooks and datasets. Follow the instructions in each notebook to go through the route optimization workflow for each use case.
NoteYou can use the Shift + Enter key combination to execute a cell in the notebook.