Assuming SWARMPATH is a directory on your local system where you want to install…
- User
Assuming SWARMPATH is a directory on your local system where you want to install everything
SWARMPATH = '/home/studio-lab-user/'
!rm -rf $SWARMPATH/StableSwarmUI/dlbackend/ComfyUI/venv/ # Remove the virtual environment directory if it exists
!pip install -r $SWARMPATH/StableSwarmUI/dlbackend/ComfyUI/requirements.txt # Install requirements
!wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
!chmod +x dotnet-install.sh
!./dotnet-install.sh --channel 7.0
!./dotnet-install.sh --channel 8.0
!wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
!dpkg -i cloudflared-linux-amd64.deb
Install Cloudflared with sudo
!wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
!sudo dpkg -i cloudflared-linux-amd64.deb
Download cloudflared prebuilt binary
!wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -O cloudflared
!chmod +x cloudflared
Now you can use ./cloudflared to run commands
import os
os.environ['SWARMPATH'] = SWARMPATH
%cd $SWARMPATH
os.environ['SWARM_NO_VENV'] = 'true'
url = "https://github.com/Stability" + "-AI/StableSwarmUI"
!git clone $url
import os
os.environ['DOTNET_SYSTEM_GLOBALIZATION_INVARIANT'] = '1'
%cd $SWARMPATH/StableSwarmUI/
!git pull
!bash ./launch-linux.sh --launch_mode none --cloudflared-path cloudflared
when i run these code in jupyter (sudo is not supportted). there is an error comes. error = /home/studio-lab-user/StableSwarmUI Already up to date. =15:03:42.354 [Init] === StableSwarmUI v0.6.2.0 Starting === 15:03:42.404 [Init] Prepping extension: StableSwarmUI.Builtin_StabilityAPIExtension.StabilityAPIExtension... 15:03:42.415 [Init] Prepping extension: StableSwarmUI.Builtin_ScorersExtension.ScorersExtension... 15:03:42.415 [Init] Prepping extension: StableSwarmUI.Builtin_ImageBatchToolExtension.ImageBatchToolExtension... 15:03:42.416 [Init] Prepping extension: StableSwarmUI.Builtin_GridGeneratorExtension.GridGeneratorExtension... 15:03:42.416 [Init] Prepping extension: StableSwarmUI.Builtin_DynamicThresholding.DynamicThresholdingExtension... 15:03:42.416 [Init] Prepping extension: StableSwarmUI.Builtin_ComfyUIBackend.ComfyUIBackendExtension... 15:03:42.417 [Init] Prepping extension: StableSwarmUI.Builtin_AutoWebUIExtension.AutoWebUIBackendExtension... 15:03:42.444 [Init] Parsing command line... 15:03:42.444 [Init] Loading settings file... 15:03:42.474 [Init] Re-saving settings file... 15:03:42.493 [Init] Applying command line settings... 15:03:42.515 [Init] Prepping options... 15:03:42.670 [Init] Loading models list... 15:03:42.676 [Init] Loading backends... 15:03:42.678 [Init] Loading backends from file... 15:03:42.679 [Init] Prepping API... 15:03:42.681 [Init] Backend request handler loop ready... 15:03:42.682 [Init] Prepping webserver... 15:03:44.118 [Init] Scan for web extensions... 15:03:44.119 [Init] Readying extensions for launch... 15:03:44.120 [Init] Launching server... 15:03:44.120 [Init] Starting webserver on http://localhost:7801 crit: Microsoft.Extensions.Hosting.Internal.ApplicationLifetime[6] An error occurred starting the application System.AggregateException: One or more errors occurred. (An error occurred trying to start process 'cloudflared' with working directory '/home/studio-lab-user/StableSwarmUI'. No such file or directory) ---> System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'cloudflared' with working directory '/home/studio-lab-user/StableSwarmUI'. No such file or directory at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec) at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) at StableSwarmUI.Utils.PublicProxyHandler.Start() in /home/studio-lab-user/StableSwarmUI/src/Utils/ProxyHandler.cs:line 71 at System.Threading.CancellationTokenSource.Invoke(Delegate d, Object state, CancellationTokenSource source) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.CancellationTokenSource.ExecuteCallbackHandlers(Boolean throwOnFirstException) --- End of inner exception stack trace --- at System.Threading.CancellationTokenSource.ExecuteCallbackHandlers(Boolean throwOnFirstException) at Microsoft.Extensions.Hosting.Internal.ApplicationLifetime.NotifyStarted() 15:03:44.189 [Init] Program is running.
- Assistant
The error message you receive indicates that the application is trying to start the
cloudflaredprocess but it cannot find the file or directory specified, leading to a failure in initializing the application.The relevant part of the error message is:
An error occurred starting the application System.AggregateException: One or more errors occurred. (An error occurred trying to start process 'cloudflared' with working directory '/home/studio-lab-user/StableSwarmUI'. No such file or directory)To address this issue, ensure the following:
- The
cloudflaredbinary is located in the expected directory (which seems to be/home/studio-lab-user/StableSwarmUI/) or make sure the path is correct in the launch command. - The
cloudflaredbinary has execute permissions (chmod +x cloudflared).
You have already done the above steps, but since the error persists, consider the following troubleshooting steps:
- Verify that
cloudflaredis indeed in '/home/studio-lab-user/StableSwarmUI/'. - Check if the current working directory is correct when you run the launch script.
- Ensure there are no path issues due to incorrect environment variables or relative paths in your commands.
- Make sure that the application launch script (
launch-linux.sh) properly referencescloudflaredby the complete path if necessary.
Based on the commands you have used, it seems you have downloaded and set up
cloudflaredtwice (once without sudo and once with sudo). The error suggests that the requiredcloudflaredbinary is still not found at the expected location when you run the service.As a quick check, try running the
cloudflaredbinary directly from the command line to see if it executes:%cd $SWARMPATH/StableSwarmUI/ ./cloudflared --versionIf this command fails with a "No such file or directory" error, it means the binary isn't at the specified location or isn't executable. Fix the path or the permissions as necessary.
If running
cloudflaredmanually works without any issue, then the problem might lie in how the application is trying to executecloudflared. You might need to look into thelaunch-linux.shscript and see if it expects cloudflared to be in a specific location relative to where the script is run.Finally, if you have to use
sudofor some operations, but it's not supported in Jupyter, you'll need to either modify the installation to not requiresudoor run these setup steps outside of Jupyter in a terminal where you do have sudo access. - The
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.