The story thus far by my recollection:

I’m trying to get Retrieval-based Voice Conversion (RVC) — a program for making voice “deepfakes” using audio-to-audio conversion — working on my Linux Mint Xfce machine. To this end, I’ve had to…

(everything I've done thus far + the Pyenv stuff highlighted)

First get Git and ffmpeg, then git clone RVC and then create a virtual environment (“venv”) in that folder, then activate that venv, and I also had to get Pip, and use Pip to install torch, torchvision, and torchaudio, then I had to install Poetry, then I had to install RVC’s dependencies using Poetry, exceeeeept two of those dependencies refuse to install, so I’ve ended up a bit stuck. At least one of these dependencies is apparently refusing to install because it’s not compatible with my version of Python, which means that I also have to install Pyenv in order to change the Python version in the venv, and so I’ve installed Pyenv’s dependencies and run the command to install Pyenv itself…

…But then the terminal spat out a message about “adding ‘pyenv’ to the load path”, ~/.bash_profile vs ~/.profile vs ~/.bashrc, and restarting my shell? After consulting a tutorial about this message, and installing Vim because it seemed like I might need that, I was still confused about what I was supposed to do, so I decided to take another break rather than continue to exhaust myself.

And this isn’t to mention how every single step of this process has also had its own hiccups and confusions, as I’m “diving in the deep end” with basically no knowledge of anything I’m doing.

Put simply, it feels like all the forces of the universe are conspiring against me, trying to keep me from installing this one simple program onto my computer.

Compare this to another form of machine learning technology: large language models. Those things are everywhere nowadays! They’re practically inescapable! They’re in Google and DuckDuckGo. Firefox even on Linux has an LLM feature now. Several mainstream social media apps have them. Windows has its Copilot, phones are getting “AI” features left and right, yadda yadda. And I’m sure you all know everything wrong with the mass adoption of LLMs already.

Put simply, it feels like all the forces of the universe are conspiring against me, trying to make it impossible for me to stay away from this crap I absolutely don’t want.

And this raises the question of why, if both of these things are popularly called “AI”, do they differ so much in this regard?

The answer to me seems to just be money. RVC has no subscription fee nor gathering of my personal data, certainly not on a privacy-friendly OS; contrarily RVC makes me more private by letting me mask my voice. RVC is also literally incapable of even attempting to influence my opinions or dull my mind; it does not rely on overseas server farms whose water use is leaving surrounding communities without tap water; and I could even swap out RVC’s training material if I objected to it. And without these “features”, it’s basically impossible for anyone to make a profit from RVC. And if it’s impossible to make a profit from RVC, then there’s no money being put into making this incredibly useful program accessible for laypeople — certainly no money being put into forcing it on people!

And I just think that’s some glorpshit.

  • makotech222 [he/him]@hexbear.net
    link
    fedilink
    English
    arrow-up
    21
    ·
    29 days ago

    Doesn’t seem like much of a linux issue, moreso a Python issue. Python is well known to have one of the worst dev environments of all time, so, yeah this tracks.

  • kleeon [he/him, he/him]@hexbear.net
    link
    fedilink
    English
    arrow-up
    10
    ·
    edit-2
    29 days ago

    I would strongly suggest using docker for this. I don’t know anything about this project but their official github repo already has everything setup for this so it’s pretty mush guaranteed to work properly.

    I know it’s annoying having to learn docker (assuming you don’t know it yet) just to install some program, but it’s absolutely necessary to preserve your sanity these days

    • CommunistCuddlefish [she/her]@hexbear.net
      link
      fedilink
      English
      arrow-up
      8
      ·
      29 days ago

      Not even Docker has preserved my sanity because I’ve had it update and break too.

      IDK what’s going on with coding environments these days but it feels like decades of bloat, disorganization, fragmentation, and lack of standardization are coming home to roost

      • kleeon [he/him, he/him]@hexbear.net
        link
        fedilink
        English
        arrow-up
        6
        ·
        29 days ago

        Not even Docker has preserved my sanity because I’ve had it update and break too.

        my solution is to never ever update docker

        IDK what’s going on with coding environments these days but it feels like decades of bloat, disorganization, fragmentation, and lack of standardization are coming home to roost

        I’m afraid linux desktop is not gonna survive for another decade if things keep going in the same direction. All the garbage like snap and flatpak is the proof that something has to urgently change - the system is becoming so complicated that you can’t even install a program without essentially spinning up a virtual machine. It’s insane

        • PorkrollPosadist [he/him, they/them]@hexbear.net
          link
          fedilink
          English
          arrow-up
          7
          ·
          edit-2
          29 days ago

          People don’t write portable software anymore. People used to write portable software and while it wasn’t magic, you could build and run it on most distros, even the BSDs, Mac, Solaris, or other funky operating systems. The build scripts were tolerant of different shells, different system utilities, different software versions. A lot of newer software is built exclusively on CI/CD pipelines, and while you could run the pipeline on various platforms, you are effectively just building a Makefile which downloads Linux ISOs over BitTorrent.

          I mean, the time had come to replace autoconf, but this ain’t it chief.

          The other thing is programming language package managers. At some point, we decided distributions were a bad thing and we should just cut distribution maintainers out of the picture. Just let software developers pick and bundle their own dependencies. Just let build systems clone hundreds of arbitrary repositories directly from other developers with no impartial quality assurance or sign-off. People just write a requirements.txt, or a cargo.toml, or a package.json and call it a fucking day. That is just a dev environment. That is not something which can be properly integrated into any OS. The amount of work that needs to be done by actual distro maintainers to package shit written in Perl / Python / Rust / Node / etc is absurd because everyone just codes with no discipline about dependencies whatsoever.

        • CommunistCuddlefish [she/her]@hexbear.net
          link
          fedilink
          English
          arrow-up
          5
          ·
          edit-2
          29 days ago

          the system is becoming so complicated that you can’t even install a program without essentially spinning up a virtual machine

          Right and that’s the thing, Linux was already complicated. Now it’s more complicated? I’ve been waiting since 2004 for Linux to really get good, or at least better than Windows or Mac. I’d say it’s there now, but not because Linux has ironed out its problems, but because the corporates have deliberately ruined their OSs leaving Linux the only internet-secure option left in the game

          (although sometimes I have considered trying to run TempleOS just for the meme value)

  • installing Vim because it seemed like I might need that

    Recomendation: use nano or something else instead[1], it’ll probably work just fine.

    Helpful tip: quiting vim can be done by pressing <ESC> (the escape button) and typing :wq (write and quit) or :q! (quit without saving)


    1. The funny answer is ed, it’s even more esoteric than vim ↩︎

  • git [he/him, comrade/them]@hexbear.net
    link
    fedilink
    English
    arrow-up
    8
    ·
    edit-2
    29 days ago

    Use Docker, it’s ideal for things like this.

    Install Docker:

    sudo apt update
    sudo apt install apt-transport-https ca-certificates curl gnupg
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker.gpg
    echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu noble stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    sudo apt update
    sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
    sudo systemctl enable --now docker
    

    This installs the docker project’s GPG key they use to sign their packages, and adds the Ubuntu repo so you can install the packages as they don’t have a Mint specific repo. It then installs Docker and enables it now and on boot.

    Run RVC:

    mkdir rvc
    cd rvc
    docker run -d --name rvc --shm-size=256m --gpus all -v ./weights:/app/assets/weights -v ./opt:/app/opt -p 7865:7865 aladdin1234/rvc-webui:0.1
    

    This creates and changes to an “rvc” directory in your current directory to keep things organised. This will download and run a 6GB image of RVC that a third party has published and mounts two directories relative to your current path (hence why we created an “rvc” directory earlier) so you can interchange data with the container, and binds the container’s port 7865 to your host’s 7865 so you can access it. You can always docker build the one that the project provides if you want instead.

    In your browser, navigate to http://127.0.0.1:7865/

    When you’re done:

    docker stop rvc

    If you want to start the same container again:

    docker start rvc

    • Erika3sis [she/her, xe/xem]@hexbear.netOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      29 days ago

      This seems like a step in the right direction, and I thank you for your help, but when I wrote docker run -d --name rvc --shm-size=256m --gpus all -v ./weights:/app/assets/weights -v ./opt:/app/opt -p 7865:7865 aladdin1234/rvc-webui:0.1 it said docker: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Head "http://%2Fvar%2Frun%2Fdocker.sock/_ping": dial unix /var/run/docker.sock: connect: permission denied

      • PorkrollPosadist [he/him, they/them]@hexbear.net
        link
        fedilink
        English
        arrow-up
        6
        ·
        edit-2
        29 days ago

        Docker containers are basically capable of doing anything root is, so normal users are not given permission to manipulate Docker by default. It is possible for the user to be added to the docker group like sudo gpasswd -a erikathreesis docker. followed by logging out (completely) and logging back in again. Consider this warning from the Debian Wiki (Mint’s upstream distro) though:

        Docker group membership is more dangerous than sudo

        The Docker daemon typically runs under the root account, so access to Docker commands effectively grants full root power. By design, this allows easy access as root to the host filesystem. Unfortunately, it also makes it trivial for a malicious user to read and alter sensitive system files, or for a careless user to allow a malicious containerized app to do so.

        Docker has no equivalent to sudo’s password check, so an arbitrary-code-execution exploit against a user in the docker group effectively grants the attacker root access. Therefore, the safer choice is to never add a user account — even your own — to the docker group, so that Docker commands can only be used via sudo.

        If Docker running at root level is an unacceptable security risk, consider running in “rootless mode” instead.

        See also “Docker daemon attack surface” in the upstream documentation for more details.

        Basically, just do sudo docker run ... instead of docker run

        Edit: Also, I’m sorry I assumed this would be more trivial. Apparently everybody but me has had nightmare situations with pip lmao. It was easy for me to set up libretranslate anyway.

        • Erika3sis [she/her, xe/xem]@hexbear.netOP
          link
          fedilink
          English
          arrow-up
          5
          ·
          edit-2
          29 days ago

          Basically, just do sudo docker run ... instead of docker run

          Oh, something’s happening! Stuff’s downloading! I’m crossing my fingers and myself repeatedly.

          Edit: Ballsack, I forgot to cd first, is that gonna be a problem? Is there a way I can fix this?

          Edit 2: docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]]

          • PorkrollPosadist [he/him, they/them]@hexbear.net
            link
            fedilink
            English
            arrow-up
            5
            ·
            29 days ago

            Based solely on a web search, this appears to be an Nvidia thing, but this is something I can’t help very much with as I don’t have any nvidia hardware. Well, it could be a number of things. There might be something missing from the specific container image you tried, or there might be something missing from the host OS (Mint).

            I stumbled on something called the Nvidia container toolkit. I’m only speculating, but setting this up might be a requirement for Docker to make use of the GPU.

            • Erika3sis [she/her, xe/xem]@hexbear.netOP
              link
              fedilink
              English
              arrow-up
              4
              ·
              29 days ago

              Guess my princess is still in another castle… But how about the thing about forgetting to cd? Looks like the command ended up creating two empty folders, opt and weights, in my username folder. If it created any other files, I don’t know where they would be.

                • Erika3sis [she/her, xe/xem]@hexbear.netOP
                  link
                  fedilink
                  English
                  arrow-up
                  4
                  ·
                  edit-2
                  29 days ago

                  Alright, so I wrote sudo docker ps and that strangely seemed to indicate I didn’t have any containers, but when I wrote sudo docker start rvc it gave me the GPU error which would indicate that I did have an RVC container in fact. So then I wrote sudo docker rm rvc and then sudo docker start rvc again, and now it says there is no such container. I then deleted the opt and weights folders and everything seems fine. I’m going to see if I can figure out this Nvidia Container Toolkit thing tomorrow and then try to run the docker again, this time ensuring that I have cd’d to the right folder beforehand. Thank you for your patience and encouragement.

  • CommunistCuddlefish [she/her]@hexbear.net
    link
    fedilink
    English
    arrow-up
    6
    ·
    29 days ago

    But then the terminal spat out a message about “adding ‘pyenv’ to the load path”, ~/.bash_profile vs ~/.profile vs ~/.bashrc, and restarting my shell? After consulting a tutorial about this message, and installing Vim because it seemed like I might need that, I was still confused about what I was supposed to do, so I decided to take another break rather than continue to exhaust myself.

    The good news is that’s easy, the bad news is I don’t remember the specifics, but I think you’re getting close!

    Is this the github repo you used? https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/docs/en/README.en.md

      • kleeon [he/him, he/him]@hexbear.net
        link
        fedilink
        English
        arrow-up
        6
        ·
        29 days ago

        You might have skipped these steps:

        spoiler

        Stock Bash startup files vary widely between distributions in which of them source which, under what circumstances, in what order and what additional configuration they perform. As such, the most reliable way to get Pyenv in all environments is to append Pyenv configuration commands to both .bashrc (for interactive shells) and the profile file that Bash would use (for login shells).

        1. First, add the commands to ~/.bashrc by running the following in your terminal:

          echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
          echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
          echo 'eval "$(pyenv init - bash)"' >> ~/.bashrc
          
        2. Then, if you have ~/.profile, ~/.bash_profile or ~/.bash_login, add the commands there as well. If you have none of these, create a ~/.profile and add the commands there.

          • to add to ~/.profile:
            echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
            echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile
            echo 'eval "$(pyenv init - bash)"' >> ~/.profile
            
          • to add to ~/.bash_profile:
            echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
            echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
            echo 'eval "$(pyenv init - bash)"' >> ~/.bash_profile
            

        Bash warning: There are some systems where the BASH_ENV variable is configured to point to .bashrc. On such systems, you should almost certainly put the eval "$(pyenv init - bash)" line into .bash_profile, and not into .bashrc. Otherwise, you may observe strange behaviour, such as pyenv getting into an infinite loop. See #264 for details.

        Also, use docker

    • blipblip [they/them]@hexbear.net
      link
      fedilink
      English
      arrow-up
      8
      ·
      29 days ago

      Depends entirely on how niche the stuff you do on your computer is. If you’re just using a web browser and playing games it should be pretty seamless (outside of certain games with invasive anti cheat)

      If it’s a laptop you might run into some hurdles with wifi drivers, idk if that’s still a common issue since I haven’t had a laptop in a decade

      • Erika3sis [she/her, xe/xem]@hexbear.netOP
        link
        fedilink
        English
        arrow-up
        4
        ·
        edit-2
        29 days ago

        Anecdotally, I didn’t have any trouble connecting my laptop to Wi-Fi.

        Edit: I might as well also say that I didn’t have any trouble updating the kernel.

    • Erika3sis [she/her, xe/xem]@hexbear.netOP
      link
      fedilink
      English
      arrow-up
      5
      ·
      edit-2
      29 days ago

      It’s going to vary depending on your exact computing needs and your personality, but for myself I’d say that switching has really been shockingly easy. The actual installation was very easy, and after that the vast majority of things I needed either came pre-installed or were a breeze to set up, including Firefox and Libreoffice, a Japanese IME, my VPN, Steam and some games, Audacity, Gimp, Inkscape, a video editing program, a subtitling program, VLC, an online radio, and maybe some other things. It was also easy to get all my files from my backup hard drive, and online passwords, bookmarks, and browser extensions through Firefox Sync or whatever it’s called. I still haven’t set up my Russian custom keyboard layout, but for the time being there’s an on-screen keyboard you can turn on by clicking on the keyboard icon in the bottom right of the taskbar (do we still call it a taskbar?) and navigating to virtual keyboard -> Russian. It’s not as convenient but I can live with it for now. My drawing pad also worked perfectly the moment I plugged it in.

      But yeah, cases like my troubles setting up RVC goes to show the importance of fiddling around in a virtual machine or live environment before installing Linux. It’s good to get some practice and a better idea of what to expect for your own computing needs. But I do think that for most average people, you’ll be able to get everything you need set up pretty easily. You might need to unlearn some muscle memory, though.

      This thread talks about some of the problems I experienced on my first day on Linux: TV HDMI issues, Tumblerd keeping me from ejecting a hard drive, and setting up trackpad gestures. I’ve had a few minor hiccups since then as well, namely that the extraction of a very large 7zip archive on my external hard drive seemed to freeze up near the end (still don’t have a solution for that, but it’s no biggie) and that turning a TV HDMI connection off and on again through the display settings seemed to mess up the TV display (I fixed this by physically unplugging the HDMI and then plugging it back in again).

    • oscardejarjayes [comrade/them]@hexbear.net
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      29 days ago

      If you need Windows only stuff with no open source alternatives, if you need user-facing complicated AI programs, or if you happen to be unlucky, it’s not so fun. But usually, everything just works.

      For some reason, even though a lot of the big companies run their AI infrastructure on Linux, AI that you run on your computer as a normal person often is developed on and requires Windows.

    • Erika3sis [she/her, xe/xem]@hexbear.netOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      29 days ago

      I experienced some mouse trouble just now as my trackpad mouse buttons suddenly just seemed to stop working. Plugging in a new mouse fixed it. I don’t know what the deal with that was but it was kinda scary.

  • CommunistCuddlefish [she/her]@hexbear.net
    link
    fedilink
    English
    arrow-up
    5
    ·
    29 days ago

    I decided to try to follow along with your steps thinking “I’m technically experienced, I can totally just install it myself, write up a good installation on my Linux Mint partition and share the steps with her!” and I have already been defeated by Mint not wanting to let me use pip and making me make a venv but then not letting me use the venv and then when I get it working not wanting to actually install pytorch. This is indeed glorpshit. I’m sorry, good luck, you should be proud of your tenacity for getting this far already.

    This does end up being my problem every time I try to wean myself onto Linux: everything is a fight to customize it and set up what I want. I dual boot and have a few different machines for different OSs because it’s easier to just use different machines for different purposes and the spares I lucked into getting either dirt cheap or entirely free. There’s a Windows partition I only ever use for games that need Windows and if I were trying to use RVC I’d be tempted at this point to just have a small windows partition for using RVC

  • invalidusernamelol [he/him]@hexbear.net
    link
    fedilink
    English
    arrow-up
    4
    ·
    29 days ago

    You can use uv for this. Clone the RVC repo, CD into the directory, run uv venv to create a virtual environment. If there’s a requirements.txt file it’ll get the requirements.

    uv will also allow you to change python versions for the venv and uv add dependencies. To pip install something without modifying the package lock, use uv pip install and it’ll install that in the environment.

    • shallot [she/her]@hexbear.net
      link
      fedilink
      English
      arrow-up
      4
      ·
      29 days ago

      Uv is so nice. The more cargo-like my tooling is, the happier I am.

      All of the astral stuff has been really awesome so far tbh.

      • invalidusernamelol [he/him]@hexbear.net
        link
        fedilink
        English
        arrow-up
        4
        ·
        edit-2
        28 days ago

        It’s honestly made me really enjoy building small projects in Python. You can also really easily integrate it into your build workflows to do testing and release wheels for publishing to PyPi.

        Not surprising it’s written in Rust lol

        It definitely takes the dependency hell that is a ton of Python projects and makes it more like dependency purgatory. Or if you program like I do, you just don’t have any dependencies and realize that you can use the standard library to do basically everything. Do still like using UV to quickly automate testing for different version of Python since I have a bad habit of immediately using new features because I think they’re cool.