Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable CONDA_PATH is uninitialized #28

Open
ostr00000 opened this issue Dec 28, 2023 · 3 comments
Open

Variable CONDA_PATH is uninitialized #28

ostr00000 opened this issue Dec 28, 2023 · 3 comments
Assignees
Labels
🚏 Awaiting User Response [ISSUE] Response from original author is pending 🐛Bug [ISSUE] Ticket describing something that isn't working 🧑‍💻 In Progress [ISSUE] Assigned to an issue that is curretly being worked on ❕ Medium Priority [ISSUE] Needs to be dealt with at some point

Comments

@ostr00000
Copy link

OS: Linux (Ubuntu 23.10)

  1. If variable CONDA_PATH is set, then it is checked if path is (correct)[https://github.com/SillyTavern/SillyTavern-Launcher/blob/8ec79f07837932ebe123e9b4f68ef251b303672b/install.sh#L82].
    But if the variable is not set, then there is an error when installing conda. The first error comes from miniconda installer. The error complain about missing argument for -p.

    As a workaround, I changed code to this:

    if [ -n "$CONDA_PATH" ]; then
        CONDA_PATH="$(find_conda)"
    else
        SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
        CONDA_PATH="$SCRIPT_DIR/miniconda"
        echo "CONDA_PATH set to $CONDA_PATH"
    fi
  2. I think that another bad thing is not aborting when something goes wrong. For example, an error when installing conda does not stop further processing, which results in another errors. I propose setting set -e flag. Or at least manually check errors. This is important especially when a console is cleaned, because then no error is seen by the user. WARNING: there will be more errors from command like git (for already cloned repos), mkdir (xtts folder is created at two places), etc.

  3. After successful conda installation, the next error is miniconda_path. Probably this should be changed to CONDA_PATH. Maybe this is related to launcher.sh, but the docs say that install.sh script should be run first.

  4. Also, as far as I know git remember executable flag, so maybe these permissions should be added to git instead of explicitly in the run command (readme: chmod +x install.sh && ./install.sh). Actually, install.sh script has already this permission, but launcher.sh is missing that.

@deffcolony deffcolony added ❕ Medium Priority [ISSUE] Needs to be dealt with at some point 🐛Bug [ISSUE] Ticket describing something that isn't working labels Jan 1, 2024
@Frityet
Copy link

Frityet commented Jan 1, 2024

Thanks for the info! I will debug

@deffcolony deffcolony assigned deffcolony and Frityet and unassigned deffcolony Jan 2, 2024
@deffcolony deffcolony added the 🧑‍💻 In Progress [ISSUE] Assigned to an issue that is curretly being worked on label Jan 2, 2024
@deffcolony
Copy link
Collaborator

@ostr00000 Please let me know if you are still encountering any issues with the install.sh script. There have been several updates to the script in recent months, including fixes for the installation process of Miniconda, among other improvements.

@deffcolony deffcolony added ✅ Fixed [ISSUE] Auto-Assigned to Tickets whose fix has been deployed 🚏 Awaiting User Response [ISSUE] Response from original author is pending and removed 🧑‍💻 In Progress [ISSUE] Assigned to an issue that is curretly being worked on labels Mar 28, 2024
@ostr00000
Copy link
Author

installation

I installed a new, clean environment using commands in README - the installation works perfectly, successfully finished. 🎉

post installation

I have one simple error:
When installation is finished, there is a question: Start the launcher now? [Y/n]. I answered y and surprisingly nothing happened. The installator clears the screen, so no error is available, but I have some "magic" script, that redirect all terminal output to a log file, so I searched there for this error. The error is: chmod: cannot access 'launcher.sh': No such file or directory (line in code).

I believe "$0" is ./lanucher.sh, so "$(dirname "$0")" is . and executing cd changes nothing.
The current path at this point of program execution is invalid, because at https://github.com/SillyTavern/SillyTavern-Launcher/blob/main/install.sh#L467 we changed the current path.
I suggest using a global variable script_path (declaration line).

Also, please note that if user do not chose Start the launcher now, there are still missing executive permissions for launcher.sh (so the 4th point from this issue is not solved).

launching

After fixing permissions and running launcher, I selected 1. Start SillyTavern, I got blink of terminal window - there is an error, but terminal is closing immediately, so it is hard to debug.
I got npm error: npm ERR! Invalid comparator: npm:dry-uninstall -
Updating npm to a newer version solved this problem.

I have a question: python and its dependencies are managed by conda, but what about npm? Do I need to install it manually on the system? Is there a requirement for a specific version? I cannot find any info about it in docs.

@deffcolony deffcolony added 🧑‍💻 In Progress [ISSUE] Assigned to an issue that is curretly being worked on and removed ✅ Fixed [ISSUE] Auto-Assigned to Tickets whose fix has been deployed labels Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚏 Awaiting User Response [ISSUE] Response from original author is pending 🐛Bug [ISSUE] Ticket describing something that isn't working 🧑‍💻 In Progress [ISSUE] Assigned to an issue that is curretly being worked on ❕ Medium Priority [ISSUE] Needs to be dealt with at some point
Projects
None yet
Development

No branches or pull requests

3 participants