finegrain-ai / refiners

A microframework on top of PyTorch with first-class citizen APIs for foundation model adaptation
https://refine.rs
MIT License
706 stars 53 forks source link

Failed when run ' rye sync --all-features' #461

Closed luliu-br closed 2 weeks ago

luliu-br commented 2 weeks ago

I tried to install refiners as recommended. But when I ran rye sync --all-features, it gave me errors as follows:

Initializing new virtualenv in /mnt/data/upscaler/refiners/.venv
Python version: cpython@3.10.15
uv::venv::creation

   × Failed to create virtualenv
   ╰─▶ Operation not supported (os error 95)
 error: failed creating virtualenv ahead of sync

 Caused by:
     0: failed to initialize virtualenv
     1: Failed to create self venv using /home/username/.rye/py/cpython@3.10.15/bin/python3. uv exited with status: exit status: 1

Then I tried to clone the resource code to another folder, and then got errors as follows:

Initializing new virtualenv in /opt/refiners/.venv
Python version: cpython@3.10.15
uv::venv::creation

   × Failed to create virtualenv
   ├─▶ failed to create directory `/opt/refiners/.venv`
   ╰─▶ Permission denied (os error 13)
 error: failed creating virtualenv ahead of sync

Caused by:
     0: failed to initialize virtualenv
     1: Failed to create self venv using /home/username/.rye/py/cpython@3.10.15/bin/python3. uv exited with status: exit status: 1

Is there any way to solve this? I also tried to install refiners via pip install refiners. After installation, I still can't import refiners in Python.

luliu-br commented 2 weeks ago

Solved by running sudo /home/username/.rye/shims/rye sync --all-features

catwell commented 2 weeks ago

Wait, what? This means you have a problem with your rye setup. You shouldn't ever need sudo with rye.