Running nvidia cuopt server on WSL2 from scratch

  1. Follow these instructions to get Ubuntu with WSL2
sudo docker run -it --gpus all --rm --network=bridge nvcr.io/ea-reopt-member-zone/ea-cuopt-server
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: mount error: file creation failed: /var/lib/docker/overlay2/539c88be4ef911f3886406a0d84829121eca7de952f700fcf378d273c3783852/merged/usr/lib/x86_64-linux-gnu/libnvidia-ml.so.1: file exists: unknown.
sudo docker run --privileged -it --rm --entrypoint /bin/bash nvcr.io/ea-reopt-member-zone/unrestricted/cuopt-server
# umount /usr/lib/x86_64-linux-gnu/libnvidia-ml.so.1
# umount usr/lib/x86_64-linux-gnu/libcuda.so.1
# rm -rf usr/lib/x86_64-linux-gnu/libcuda.so.1
# rm -rf /usr/lib/x86_64-linux-gnu/libnvidia-ml.so.1
# docker container list 
CONTAINER ID IMAGE
b52e37fe5592 nvcr.io/ea-reopt-member-zone/ea-cuopt-server
# docker commit b52e37fe5592 nvcr.io/ea-reopt-member-zone/ea-cuopt-server# docker images
sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nvcr.io/ea-reopt-member-zone/ea-cuopt-server latest 36228ad5936a 11 seconds ago 14.4GB
nvcr.io/ea-reopt-member-zone/ea-cuopt-server <none> 21e508bdd168 5 weeks ago 14.4GB
sudo docker run -it --gpus all --rm --network=bridge -p 5000:5000 nvcr.io/ea-reopt-member-zone/ea-cuopt-server
# conda activate cuopt
# python cuopt-service/service.py
http://localhost:5000/docs
FastAPI documentation page

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Michael T. Wagner

Michael T. Wagner

35 Followers

CTO and Co-Founder @ipolog.ai, creating clever solutions for smart factory