cuOpt Not Working on WSL2 + Ubuntu 22.04.5 + Docker (404 Error)

Hello,

I am trying to run cuOpt on my Windows 11 machine using WSL2 with Ubuntu 22.04.5. My setup includes CUDA, and Docker runs without any issues. I have a free subscription to NVIDIA Enterprise and followed the instructions from this link.

Here is the command I used to start the cuOpt server:

docker run -it \
    --gpus='"device=0"' \
    -p 5000:5000 \
    -e NGC_API_KEY \
    nvcr.io/nvidia/cuopt/cuopt:24.11

# run docker log
Status: Downloaded newer image for nvcr.io/nvidia/cuopt/cuopt:24.03
/usr/lib/python3.10/runpy.py:126: RuntimeWarning: 'cuopt_server.cuopt_amr_service' found in sys.modules after import of package 'cuopt_server', but prior to execution of 'cuopt_server.cuopt_amr_service'; this may result in unpredictable behaviour
  warn(RuntimeWarning(msg))
2025-02-25 06:19:47.820 INFO cuopt server version 24.03.00a172
2025-02-25 06:19:47.833 INFO solver waiting on job queue
2025-02-25 06:19:47.836 INFO receive results waiting on result queue
2025-02-25 06:19:47.873 INFO Started server process [54]
2025-02-25 06:19:47.875 INFO Waiting for application startup.
2025-02-25 06:19:47.876 INFO Application startup complete.
2025-02-25 06:19:47.876 INFO Uvicorn running on http://0.0.0.0:5000 (Press CTRL+C to quit)
2025-02-25 06:19:56.926 INFO 172.17.0.1:43770 - "GET / HTTP/1.1" 404
2025-02-25 06:19:57.055 INFO 172.17.0.1:43770 - "GET /favicon.ico HTTP/1.1" 404
2025-02-25 06:20:17.864 INFO solver checking cuda health

After running the command, the server seems to start, but I notice a warning message during startup:

/usr/lib/python3.10/runpy.py:126: RuntimeWarning: 'cuopt_server.cuopt_amr_service' found in sys.modules after import of package 'cuopt_server', but prior to execution of 'cuopt_server.cuopt_amr_service'; this may result in unpredictable behaviour
  warn(RuntimeWarning(msg))

The logs indicate that the server is running:

2025-02-25 06:19:47.876 INFO Uvicorn running on http://0.0.0.0:5000 (Press CTRL+C to quit)

However, when I try to access the server via a browser or curl, I receive a 404 Not Found response:

{"detail":"Not Found"}

I have tried accessing both localhost:5000/ and localhost:5000/cuopt, but I still get the same 404 error.

Here are some relevant log entries showing the 404 responses:

2025-02-25 06:21:16.600 INFO 172.17.0.1:45010 - "GET / HTTP/1.1" 404
2025-02-25 06:21:24.347 INFO 172.17.0.1:45012 - "GET /cuopt HTTP/1.1" 404
2025-02-25 06:23:35.026 INFO 172.17.0.1:33066 - "GET /cuopt HTTP/1.1" 404

It looks like the server is running but not exposing the expected API endpoints.

Questions:

  1. Am I missing any additional configuration steps?
  2. What is the correct endpoint to access cuOpt?
  3. Could the RuntimeWarning be affecting the server’s functionality?

Any help would be greatly appreciated!

Thanks!

You are trying to access wrong endpoint, so it is giving 404 error, valid set of endpoints can be found here cuOpt API redoc

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.