Skip to content

[BUG] Unable to run cuopt-sh-client without installing cuopt-server-cux library #90

@JamesMaki

Description

@JamesMaki

Describe the bug
Currently the cuopt-sh-client library will not run work without also installing cuopt-server which has very large dependencies (cuVS, cuDF, Numba, CUDA, cuBLAS, etc.) which is preventing it from being used in non-GPU environments (like Amazon Lambda). Even after installing all of these the library will not load correctly if GPU drivers are not installed due to checks in the Numba library that throw errors during loading if the GPU driver is not found.

Steps/Code to reproduce bug
Launch cuOpt server remotely.

docker run --gpus all -it --rm -p 8000:8000 -e CUOPT_SERVER_PORT=8000 nvidia/cuopt:25.5.0-cuda12.8-py312 /bin/bash -c "python3 -m cuopt_server.cuopt_service"

Install cuopt-sh-client and attempt to import in Python.

pip install --extra-index-url https://pypi.nvidia.com --user cuopt-sh-client==25.5.*
python -c "from cuopt_sh_client import CuOptServiceSelfHostClient"

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[6], line 6
      4 import matplotlib.pyplot as plt
      5 import matplotlib.font_manager as fm
----> 6 from cuopt_sh_client import CuOptServiceSelfHostClient

File /opt/conda/lib/python3.12/site-packages/cuopt_sh_client/__init__.py:18
      1 # SPDX-FileCopyrightText: Copyright (c) 2023-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.  # noqa
      2 # SPDX-License-Identifier: Apache-2.0
      3 #
   (...)     13 # See the License for the specific language governing permissions and
     14 # limitations under the License.
     16 from cuopt_sh_client._version import __git_commit__, __version__
---> 18 from .cuopt_self_host_client import (
     19     CuOptServiceSelfHostClient,
     20     get_version,
     21     is_uuid,
     22     mime_type,
     23     set_log_level,
     24 )
     25 from .thin_client_solver_settings import (
     26     PDLPSolverMode,
     27     SolverMethod,
     28     ThinClientSolverSettings,
     29 )

File /opt/conda/lib/python3.12/site-packages/cuopt_sh_client/cuopt_self_host_client.py:31
     29 import numpy as np
     30 import requests
---> 31 import solution
     33 from . import _version
     34 from .thin_client_solver_settings import ThinClientSolverSettings

File ~/.local/lib/python3.12/site-packages/solution/__init__.py:16
      1 # SPDX-FileCopyrightText: Copyright (c) 2023-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.  # noqa
      2 # SPDX-License-Identifier: Apache-2.0
      3 #
   (...)     13 # See the License for the specific language governing permissions and
     14 # limitations under the License.
---> 16 from .solution import Solution

File ~/.local/lib/python3.12/site-packages/solution/solution.py:16
      1 # SPDX-FileCopyrightText: Copyright (c) 2023-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.  # noqa
      2 # SPDX-License-Identifier: Apache-2.0
      3 #
   (...)     13 # See the License for the specific language governing permissions and
     14 # limitations under the License.
---> 16 from cuopt.linear_programming.solver.solver_wrapper import (
     17     LPTerminationStatus,
     18     MILPTerminationStatus,
     19     ProblemCategory,
     20 )
     23 class PDLPWarmStartData:
     24     def __init__(
     25         self,
     26         current_primal_solution,
   (...)     42         iterations_since_last_restart,
     43     ):

ModuleNotFoundError: No module named 'cuopt'

Expected behavior
Would like to run client examples and jupyter notebook examples in a minimal Python environment (CPU only) and very few dependencies with cuOpt server running remotely.

Environment details (please complete the following information):
Using Docker Hub cuOpt Docker image and this Jupyterlab Docker image - quay.io/jupyter/datascience-notebook:latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions