hzi-bifo / RiboDetector

Accurate and rapid RiboRNA sequences Detector based on deep learning
GNU General Public License v3.0
94 stars 16 forks source link

Please use detect_cpu.py to run it on CPU if you do not have GPU or you need to install GPU version of PyTorch #32

Closed Rohit-Satyam closed 1 year ago

Rohit-Satyam commented 1 year ago

When running ribodetector on a system without GPU it says:

ribodetector -t 10 -l 100 -i ../../../trim_batch2/1099_S21_L001_R1_P.fastq.gz ../../../trim_batch2/1099_S21_L001_R2_P.fastq.gz \
-e rrna -r rrna.R1.fq rrna.R2.fq --chunk_size 256 -o reads.nonrrna.1.fq reads.nonrrna.2.fq
2023-04-08 14:34:15 : INFO  Using high MCC model file: /home/subudhak/miniconda3/envs/temp/lib/python3.9/site-packages/ribodetector/data/ribodetector_600k_variable_len70_101_epoch47.pth
2023-04-08 14:34:15 : ERROR  No visible CUDA devices! Please use detect_cpu.py to run it on CPU if you do not have GPU or 
you need to install GPU version of PyTorch
Traceback (most recent call last):
  File "/home/subudhak/miniconda3/envs/temp/bin/ribodetector", line 10, in <module>
    sys.exit(main())
  File "/home/subudhak/miniconda3/envs/temp/lib/python3.9/site-packages/ribodetector/detect.py", line 725, in main
    seq_pred.load_model()
  File "/home/subudhak/miniconda3/envs/temp/lib/python3.9/site-packages/ribodetector/detect.py", line 100, in load_model
    raise RuntimeError(
RuntimeError: Set CUDA_VISIBLE_DEVICES or use CPU inference.

I tried solution given in issue 8, but the error persists.

dawnmy commented 1 year ago

Thank for trying out RiboDetector. In your case, the CPU mode (ribodetector_cpu) should be used instead.

https://github.com/hzi-bifo/RiboDetector#cpu-mode

Hope this helps!

Rohit-Satyam commented 1 year ago

Oh My bad. I couldn't read _cpu in the code chunk in readme. Apologies.