I needed to pip install openai-whisper to my google cloud VM for a project but I got the error
ERROR: Could not install packages due to an OSError: [Errno 28] No space left on device
so I attached a new standart persistent disk (sda) with 20Gb. It wasn't mounted when I attached it, ignore the "/mnt/disks/mymountdir":
I am new to working on SSH so I looked up a lot of tutorials but this one got me the furthest: https://www.youtube.com/watch?v=sT7-_qn71cw. The tutorial's attached disk was named "sdb", mine was "sda" so our commands are minutely different. Here is what I did to mount:
sudo mkfs.ext4 -m 0 -F -E lazy_itable_init=0,lazy_journal_init=0,discard /dev/sda
sudo mkdir -p /mnt/disks/mymountdir
sudo mount -o discard,defaults /dev/sda /mnt/disks/mymountdir
sudo chmod a+w /mnt/disks/mymountdir
Then I tried installing again but got the same error. When checked with "df -hT" I saw that the new disk was barely used.

I also tried using --target with a smaller package (numpy) but here is what I got:
So I tried again with "sudo pip install --target=/mnt/disks/mymount/dir numpy" which installed somewhere but the attached disk was still empty.
VM
Machine type: n1-standard-1
CPU platform: Intel Haswell
Minimum CPU platform: None
Architecture: x86/64
PS. I know that running whisper on cpu isn't a good idea. I am testing on my cpu-only vm to avoid getting billed too much as I figure it out. I got the same problem on my other VMs with GPUs.
Update: I used "sudo chown -R $USER /mnt/disks/mymountdir" and I no longer get permission issues when I use --target without "sudo". I was able to install numpy and see that the new disk had been used. However, when I tried installing openai-whisper, I got:
It does the same thing when I try to install torch separately.

