text-generation-webui icon indicating copy to clipboard operation
text-generation-webui copied to clipboard

How to disable CUDA when installing through docker (run CPU only)

Open AndreiSva opened this issue 3 years ago • 5 comments

I'm trying to install through docker, but I don't have an nvidia gpu. How can I configure the .env file to install the webui on a computer without CUDA support?

AndreiSva avatar Apr 13 '23 02:04 AndreiSva

@oobabooga would this be an easy answer for you?

Morriz avatar Apr 18 '23 18:04 Morriz

I honestly don't know. Maybe @loeken can help

oobabooga avatar Apr 18 '23 18:04 oobabooga

not tested but i think if you remove the section:

# deploy:
#   resources:
#     reservations:
#       devices:
#         - driver: nvidia
#           device_ids: ['0']
#           capabilities: [gpu]

from the docker compose.yml it should work

loeken avatar Apr 20 '23 19:04 loeken

If the server doesn't have any GPU, you must take one more step:

  • Open file ./modules/GPTQ_loader.py
  • Go to line 79
  • Change the line to this model.load_state_dict(torch.load(checkpoint, map_location=torch.device('cpu')), strict=False)

baonq-me avatar May 02 '23 04:05 baonq-me

tnx, but this should be made configurable then

Morriz avatar May 03 '23 13:05 Morriz

This issue has been closed due to inactivity for 6 weeks. If you believe it is still relevant, please leave a comment below. You can tag a developer in your comment.

github-actions[bot] avatar Sep 03 '23 23:09 github-actions[bot]