cuopt-install
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesecuOpt Install (user)
cuOpt 安装指南(用户版)
Install cuOpt to use it from Python, C, or as a REST server. For building cuOpt from source to contribute or modify it, see .
cuopt-developer安装cuOpt以在Python、C语言环境中使用,或作为REST服务器运行。如需从源码构建cuOpt以进行贡献或修改,请查看。
cuopt-developerSystem requirements
系统要求
- GPU: NVIDIA Compute Capability ≥ 7.0 (Volta or newer). Examples: V100, A100, H100, RTX 20xx/30xx/40xx. Not supported: GTX 10xx (Pascal).
- CUDA: 12.x or 13.x. The package CUDA suffix must match the runtime CUDA (e.g. /
cuopt-cu12with CUDA 12).libcuopt-cu12 - Driver: NVIDIA driver compatible with the CUDA version.
- (Python) depends on
cuopt-cuXX(C), so installing the Python package also installs the C library and headers. Installinglibcuopt-cuXXon its own does not install the Python API.libcuopt-cuXX
- GPU:NVIDIA Compute Capability ≥ 7.0(Volta或更新架构)。示例型号:V100、A100、H100、RTX 20xx/30xx/40xx。不支持:GTX 10xx(Pascal架构)。
- CUDA:12.x 或 13.x。包的CUDA后缀必须与运行时CUDA版本匹配(例如,CUDA 12对应/
cuopt-cu12)。libcuopt-cu12 - 驱动:与CUDA版本兼容的NVIDIA驱动。
- (Python版)依赖于
cuopt-cuXX(C版),因此安装Python包时也会同时安装C库和头文件。单独安装libcuopt-cuXX不会安装Python API。libcuopt-cuXX
Required questions
需确认的问题
Ask these if not already clear:
- Interface — Python, C, or REST server? Server can be called from any language via HTTP.
- CUDA version — What is installed? Check with or
nvcc --version.nvidia-smi - Package manager — pip, conda, or Docker preferred?
- Environment — Local machine with GPU, cloud instance, Docker/Kubernetes, or remote/server (no local GPU)?
若以下信息不明确,请先确认:
- 接口类型 — Python、C语言还是REST服务器?服务器可通过HTTP被任意语言调用。
- CUDA版本 — 已安装的版本是什么?可通过或
nvcc --version查看。nvidia-smi - 包管理器 — 优先使用pip、conda还是Docker?
- 运行环境 — 带GPU的本地机器、云实例、Docker/Kubernetes环境,还是无本地GPU的远程/服务器?
Python API
Python API
Choose one — do not run both. The second install would override the first and can cause CUDA / package mismatch.
选择其中一种方式 — 不要同时运行两种。第二种安装会覆盖第一种,可能导致CUDA/包版本不匹配。
pip
pip
- CUDA 13.x:
bash
pip install --extra-index-url=https://pypi.nvidia.com cuopt-cu13 - CUDA 12.x:
bash
pip install --extra-index-url=https://pypi.nvidia.com 'cuopt-cu12==26.2.*'
- CUDA 13.x:
bash
pip install --extra-index-url=https://pypi.nvidia.com cuopt-cu13 - CUDA 12.x:
bash
pip install --extra-index-url=https://pypi.nvidia.com 'cuopt-cu12==26.2.*'
conda
conda
bash
conda install -c rapidsai -c conda-forge -c nvidia cuoptbash
conda install -c rapidsai -c conda-forge -c nvidia cuoptVerify
验证安装
python
import cuopt
print(cuopt.__version__)
from cuopt import routing
dm = routing.DataModel(n_locations=3, n_fleet=1, n_orders=2)python
import cuopt
print(cuopt.__version__)
from cuopt import routing
dm = routing.DataModel(n_locations=3, n_fleet=1, n_orders=2)C API
C API
The C API ships in , which is also pulled in as a dependency of — so if you already installed the Python package, the C library and headers are already present. Install standalone only when you want the C API without Python. Choose one of pip or conda — do not run both.
libcuopt-cuXXcuopt-cuXXlibcuoptC API包含在中,它也是的依赖项——因此如果您已安装Python包,C库和头文件已存在。仅当您需要独立的C API而不需要Python时,才单独安装。选择pip或conda中的一种方式 — 不要同时运行两种。
libcuopt-cuXXcuopt-cuXXlibcuoptpip
pip
- CUDA 13.x:
bash
pip install --extra-index-url=https://pypi.nvidia.com libcuopt-cu13 - CUDA 12.x:
bash
pip install --extra-index-url=https://pypi.nvidia.com 'libcuopt-cu12==26.2.*'
- CUDA 13.x:
bash
pip install --extra-index-url=https://pypi.nvidia.com libcuopt-cu13 - CUDA 12.x:
bash
pip install --extra-index-url=https://pypi.nvidia.com 'libcuopt-cu12==26.2.*'
conda
conda
bash
conda install -c rapidsai -c conda-forge -c nvidia libcuoptbash
conda install -c rapidsai -c conda-forge -c nvidia libcuoptVerify
验证安装
See
for the canonical C-API header/library commands (conda and pip/venv variants).
references/verification_examples.mdfind请查看
获取标准的C API头文件/库查找命令(包含conda和pip/venv两种环境的示例)。
references/verification_examples.mdServer (REST)
服务器(REST)
pip
pip
bash
pip install --extra-index-url=https://pypi.nvidia.com cuopt-server-cu12 cuopt-sh-clientbash
pip install --extra-index-url=https://pypi.nvidia.com cuopt-server-cu12 cuopt-sh-clientconda
conda
bash
conda install -c rapidsai -c conda-forge -c nvidia cuopt-server cuopt-sh-clientbash
conda install -c rapidsai -c conda-forge -c nvidia cuopt-server cuopt-sh-clientDocker
Docker
bash
docker pull nvidia/cuopt:latest-cuda12.9-py3.13
docker run --gpus all -it --rm -p 8000:8000 nvidia/cuopt:latest-cuda12.9-py3.13bash
docker pull nvidia/cuopt:latest-cuda12.9-py3.13
docker run --gpus all -it --rm -p 8000:8000 nvidia/cuopt:latest-cuda12.9-py3.13Verify
验证安装
bash
python -m cuopt_server.cuopt_service --ip 0.0.0.0 --port 8000 &
sleep 5
curl -s http://localhost:8000/cuopt/health | jq .bash
python -m cuopt_server.cuopt_service --ip 0.0.0.0 --port 8000 &
sleep 5
curl -s http://localhost:8000/cuopt/health | jq .Common Issues
常见问题
- → check
No module named 'cuopt',pip list | grep cuopt, reinstall with the correct extra-index-url.which python - CUDA not available → run and
nvidia-smi; ensure the package CUDA suffix (nvcc --versionvscu12) matches the installed CUDA.cu13 - Python vs C → pulls in
cuopt-cuXXas a transitive dependency, so the C library (libcuopt-cuXX) and headers (libcuopt.so) are already available after installing the Python package. The reverse is not true:cuopt_c.halone does not install the Python bindings.libcuopt-cuXX
- → 检查
No module named 'cuopt'、pip list | grep cuopt,使用正确的extra-index-url重新安装。which python - CUDA不可用 → 运行和
nvidia-smi;确保包的CUDA后缀(nvcc --versionvscu12)与已安装的CUDA版本匹配。cu13 - Python与C的关系 → 会将
cuopt-cuXX作为传递依赖引入,因此安装Python包后,C库(libcuopt-cuXX)和头文件(libcuopt.so)已可用。反之则不成立:单独安装cuopt_c.h不会安装Python绑定。libcuopt-cuXX
See also
另请参阅
- verification_examples.md — full verification recipes for Python, C, server, and Docker.
- — build cuOpt from source and contribute to the codebase.
cuopt-developer
- verification_examples.md — Python、C语言、服务器和Docker环境下的完整验证教程。
- — 从源码构建cuOpt并为代码库做贡献。
cuopt-developer