Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for using cloud GPU #14

Open
DataTracer opened this issue Sep 14, 2023 · 5 comments
Open

Support for using cloud GPU #14

DataTracer opened this issue Sep 14, 2023 · 5 comments

Comments

@DataTracer
Copy link

I want to use the SAM on Qupath but don't have any GPU on my computer. Would it be possible to provide access to something similar to Cloud collab

@ksugar
Copy link
Owner

ksugar commented Sep 15, 2023

Hi @DataTracer, thank you for the question.

Unfortunately, Google Colab does not allow to host a web service offerings not related to interactive computing with Colab.
https://research.google.com/colaboratory/faq.html#limitations-and-restrictions

I don't have any good suggestions for free GPU options. For paid options, we can set up the samapi server with a GPU instance on a public cloud service (e.g. Amazon AWS, Microsoft Azure, Google Cloud).

Did you try running the samapi server without GPU (CPU mode) on your machine? I have tested samapi without GPU, and it is still feasible to work with it.

The installation is simple as below:

conda create -n samapi -y python=3.10
conda activate samapi
python -m pip install git+https://github.com/ksugar/samapi.git

Then you can run it with the following command.

export PYTORCH_ENABLE_MPS_FALLBACK=1 # Required for running on Apple silicon
uvicorn samapi.main:app

I hope it works for you.

@DataTracer
Copy link
Author

Thanks! Your extension works really well and I tried it on CPU but obviously not as fast :-)
I am trying to train the classifiers of Qupath on some users DAB data, fingers crossed!
Thanks for building this and making it available for the community

Best wishes
Nabanita

@DataTracer
Copy link
Author

Hi, I am using a workstation with NVIDIARTX5000 and
installed as below :
If you're using a computer with CUDA-compatible GPU, install cudatoolkit.

conda install -c conda-forge -y cudatoolkit=11.7
If you're using a computer with CUDA-compatible GPU on Windows, install torch with GPU-support with the following command.

Windows with CUDA-compatible GPU only

python -m pip install "torch>=1.13.1,<2.0" torchvision --index-url https://download.pytorch.org/whl/cu117

Then when i am launching the server i get the following message

GPU_not_found

I could be wrong but RTX 5000 is CUDA compatible ?

Looking forward to your reply
Nabanita

@ksugar
Copy link
Owner

ksugar commented Sep 19, 2023

Hi @DataTracer, RTX 5000 is compatible with CUDA 11.7 according to this matrix.
https://forums.developer.nvidia.com/t/cuda-compatibility-between-nvidia-rtx-a5000-and-geforce-rtx-4060-ti/264216

Could you share the output of the nvidia-smi command? The Nvidia driver may need to be updated.

Example:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 528.89       Driver Version: 528.89       CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name            TCC/WDDM | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA RTX A4000   WDDM  | 00000000:01:00.0 Off |                  Off |
| 41%   31C    P8     7W / 140W |    238MiB / 16376MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

@DataTracer
Copy link
Author

Hi @ksugar , Thank you, I am trying to run the nvidia-smi command, it disappears instantly, so I am unable to share the output.

On a separate note , I also posted this on image.sc but do you have any thoughts on how to use SAM annotations to train the object classifier in QuPath?

Thanks a lot
Best
Nabanita

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants