Tuesday, October 24, 2023

Issues with running scArches

The scarches command below:


scarches_model = sca.models.SCVI.load_query_data( adata=adata_to_map_augmented, reference_model="./reference_model", freeze_dropout=True)

gave the following error:

RuntimeError: The NVIDIA driver on your system is too old (found version 11040). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver.


nvcc --version

nvcc: NVIDIA (R) Cuda compiler driver

Copyright (c) 2005-2021 NVIDIA Corporation

Built on Thu_Nov_18_09:45:30_PST_2021

Cuda compilation tools, release 11.5, V11.5.119

Build cuda_11.5.r11.5/compiler.30672275_0


import torch
print(torch.version.cuda)
12.1

So, I ran the following:

pip install light-the-torch
ltt install torch torchvision


Looks like my cuda and torch versions are not same. it is scary to update nvidia drivers without backing up. Coz this may result in issues. So thought I will not delve into cuda for now.

But again I got this error:

RuntimeError: Detected that PyTorch and torchvision were compiled with different CUDA major versions. PyTorch has CUDA Version=12.1 and torchvision has CUDA Version=11.8. Please reinstall the torchvision that matches your PyTorch install.

I did the following:

conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia


This time again another error:

undefined symbol when importing torchaudio with pytorch...


Now, did the following, the above error was resolved

pip install -U torch torchaudio --no-cache-dir


Instead of gpu I relied on CPU.

scarches_model = sca.models.SCVI.load_query_data( adata=adata_to_map_augmented, reference_model="./reference_model", freeze_dropout=True, use_gpu=False )

Now, I have only a warning as below:

WARNING:jax._src.xla_bridge:An NVIDIA GPU may be present on this machine, but a CUDA-enabled jaxlib is not installed. Falling back to cpu.

Monday, October 2, 2023

Blank Screen Cursor at Top Left Ubuntu 22.04 LTS

I changed to Nouveau driver and I could not login 

cannot login to tty using CTRL+ALT+[F1 to F7] - Blank screen still persists

Reboot to recovery mode 

- Shift did not work at all

- ESC took me to grub mode - but nothing worked! ( i think i pressed ESC too long!)

- ESC until I saw logo (not ubuntu) on the monitor - 

https://support.starlabs.systems/kb/guides/using-recovery-mode

https://linuxconfig.org/how-to-uninstall-the-nvidia-drivers-on-ubuntu-20-04-focal-fossa-linux

Then I pressed enter for option: Press Enter for maintenance

nvidia-smi

ubuntu-drivers autoinstall
apt-get update
ubuntu-drivers devices
apt install nvidia-driver-535


apt-get purge nvidia*

sudo ubuntu-drivers autoinstall 

sudo reboot

This still did not result in correct configuration. I changed the driver from 535 to 470, then it started working!