Server error cuOpt

Hi,
When I try the following
sudo docker run --network=host -it --gpus all --rm nvcr.io/nvidia/cuopt/cuopt:22.12

I get the following error:

INFO:     Started server process [1059]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:5000 (Press CTRL+C to quit)
INFO:     127.0.0.1:38724 - "GET / HTTP/1.1" 404 Not Found
INFO:     127.0.0.1:33238 - "GET / HTTP/1.1" 404 Not Found
INFO:     127.0.0.1:57024 - "GET / HTTP/1.1" 404 Not Found
INFO:     127.0.0.1:43460 - "GET / HTTP/1.1" 404 Not Found

PS: Even with Python SDK, I have the same kind of issue.

Best,
Naveen

What kind of request are you sending it to the server?

And are you running on WSL?

the apis are available in http://0.0.0.0:5000/cuopt/

for docs : http://0.0.0.0:5000/cuopt/redoc or http://0.0.0.0:5000/cuopt/docs

For examples on how to form the request data follow examples in cuOpt-Resources/notebooks/routing/microservice at branch-22.12 · NVIDIA/cuOpt-Resources · GitHub

Make sure the request is goinf as HTTP and not HTTPS.

I just started with cuOpt and run the first command mentioned under NVIDIA CUOPT CONTAINER Setup — cuOpt 22.12.00 documentation … So, I haven’t sent any request.
However, Jupyter notebook works fine as I can open it in the browser and run.

May be then something trying to ping port 5000 and hitting this server, since request is not proper it is just giving error.

Agree with above, it looks to me like the request is just wrong. Here is my output, and the two commands that I sent. As you can see I got the 404 from the second request and the log message matches.

INFO:     Started server process [1060]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:5000 (Press CTRL+C to quit)
INFO:     127.0.0.1:42646 - "GET /cuopt/health HTTP/1.1" 200 OK
INFO:     127.0.0.1:40266 - "GET / HTTP/1.1" 404 Not Found

$ curl 127.0.0.1:5000/cuopt/health
{"status":"RUNNING","version":"22.12"}

# This one does not work because just / is not an endpoint for cuopt
$ curl 127.0.0.1:5000
{"detail":"Not Found"}

If you go here on github, there are utility scripts for running cuopt and in the cuopt-api subdirectory there is a sample program for posting a problem to the server.

Update, fixed:
Actually one mistake in post-cuopt.py which I will fix, line 101 should use "set_cost_matrix’ instead of ‘add_cost-matrix’