• Strit@lemmy.linuxuserspace.show
    link
    fedilink
    arrow-up
    7
    ·
    3 months ago

    PATH is a shell variable that defines where stuff can be executed from without writing their absolute path.

    So the export PATH command just adds the scale stuff to the path.

    • WereCat@lemmy.worldOP
      link
      fedilink
      arrow-up
      2
      ·
      3 months ago

      Well, I progressed quite a bit and learned a lot more than I knew until now but I give up. This is way over my head, I’ll stick to using ROCM for now. Thanks for pointing me in the right direction at least.

      • bigbuckalex@lemmy.zip
        link
        fedilink
        arrow-up
        2
        ·
        3 months ago

        Sorry to tell you to RTFM, but little obstacles like this will be WAY easier to deal with if you just commit some time to learning the basics. I’d recommend linuxjourney.com, if you take the time to fully understand everything there you will know more than 99% of people here about this stuff

        • WereCat@lemmy.worldOP
          link
          fedilink
          arrow-up
          1
          ·
          3 months ago

          I’m fine with RTFM but I had no idea PATH is a global variable and I assumed it’s telling me to specify path to something. So I had no idea I need to RTFM because I did not RTFM to understand that I need to RTFM. After the first reply pointed me the right direction I managed to make sense of it. Though english is not my first language and some of the terms are just over my head so I had to RTFM with dictionary which took a lot of time for me to finally understand because I was doing another thing wrong on top of that which specifically was

          I had to do ~/SCALE_PATH instead of the confusing example of $(SCALE_PATH} as trying nvcc --version did absolutely nothing even though the path was correct

          I’ve been on Linux since April so I’ve stumbled a lot but got many things to work, it just takes me a lot of time to get trough it and I’ve really stumbled on this one. Getting ROCM to work was a breeze and most recently getting PyTorch with ROCM to work for AI generative models on AMD. I’ve also finally started to tinker with toolbox a lot more and finally understand the benefits of it.

    • WereCat@lemmy.worldOP
      link
      fedilink
      arrow-up
      2
      ·
      3 months ago

      Thanks, I’m still not sure I completely understand but I think this iis how it’s supposed to be

  • TheDarkQuark@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    3 months ago

    Explaining like you are 5:

    If you have worked with programming languages, you might have come across global variables and inbuilt functions/keywords. PATH is a similar global variable for your terminal session.

    Every time you open up a terminal, you load up these “global variables”, and you/programs can access them (or the applications assigned to them).

    So, let’s say you have your application (executable) as /home/werecat/corncob/bin/corn, instead of starting it with ./home/werecat/corncob/bin/corn ..., if you have /home/werecat/corncob/bin in your PATH variable, you can just use it as corn ....

    export PATH="/home/werecat/corncob/bin:$PATH"
    

    just means:

    1. PATH = /home/werecat/corncob/bin + PATH
    2. persist (export) path for the duration of this session (usually until you close the terminal tab)

    If you see somewhere to add it to your /home/werecat/.bashrc file, it means “all commands in .bashrc file are auto-executed every time you start a new terminal session, so if you have it there, you won’t need to manually keep entering the command over and over again”.

    You can list these environment variables by just running:

    env
    

    Also, recommend you have a look at https://www.freecodecamp.org/news/how-to-set-an-environment-variable-in-linux/.

    Hope this helps. Good luck on your Linux journey.

    • WereCat@lemmy.worldOP
      link
      fedilink
      arrow-up
      1
      ·
      3 months ago

      Thanks. That’s a good ELI5. Fortunately I managed to make sense of it before your reply but the link to environment variables is highly appreciated. As I already replied to someone else, I had no idea PATH was a global/environment variable and just assumed it’s telling me to specify path so I had no idea I need to RTFM as it confused me greatly and on top of that I did another mistake which confused me even more when I finally managed to get it to do correctly which made me think I am doing it wrong.

      I gave up at CMAKE finally as I really need to RTFM more on that as it started to throw many errors at me.

  • moonpiedumplings@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    3 months ago

    So I don’t know how much you know about the shell, but the way that the linux command line works is that there are a set of variables, called environment variables, which dictate so me behavior of the shell. For example, $PATH variable, refers to what directories to search through, when you try to execute a program in your shell.

    The documentation you linked, wants you to create a custom shell variable, called SCALE_PATH, consisting of a folder path, which contains the compiled binaries/programs of scale you want to run.

    This command: export PATH="${SCALE_PATH}/bin:$PATH"

    temporarily edits your PATH variable to add that folder with the scale programs you want to run to your path, enabling you to execute them from your shell.