caliban icon indicating copy to clipboard operation
caliban copied to clipboard

Make caliban fall back to cpu-only gracefully for local or shell commands

Open dfurrer opened this issue 5 years ago • 1 comments

Currently if a user runs caliban shell either on a Mac they get this message:

'caliban shell' doesn't support GPU usage on Macs! Please pass --nogpu to use this command.

If they do so on a linux machine without GPU they get:

...
I1029 12:21:05.082031 139972099938112 run.py:335] Running command: docker run --runtime nvidia --ipc host -w /usr/app -u 102880:89939 -v /google/src/cloud/danielfurrer/xcloud/google3/learning/brain/frameworks/xcloud/examples/huggingface:/usr/app -it --entrypoint /bin/bash -v /usr/local/google/home/danielfurrer:/home/danielfurrer 5cc9af84e5cd
docker: Error response from daemon: Unknown runtime specified nvidia.

Would it be reasonable to just detect what runtimes are available and fall back to the behavior of --nogpu (perhaps with a warning)?

dfurrer avatar Oct 29 '20 12:10 dfurrer

@dfurrer , this is a great suggestion - I've done some work that will make it easy to specify the default for your machine or project in your .calibanconfig.json, but auto-detection with a warning is a great UI suggestion. Let me see what we can do.

sritchie avatar Oct 29 '20 18:10 sritchie