Compare commits

...
Sign in to create a new pull request.

5 commits

Author SHA1 Message Date
Daniel Han
1b2f3edd94
Merge branch 'main' into fix/one-line-launch-windows 2026-03-20 02:01:55 -07:00
Daniel Han
c7146605f7
Merge branch 'main' into fix/one-line-launch-windows 2026-03-20 01:50:03 -07:00
Manan17
5156d573da one liner variable 2026-03-20 07:39:22 +00:00
Manan17
06b7fab3e5 one liner 2026-03-20 07:36:37 +00:00
Manan17
8e3e781520 Changing the windows launch to one liner 2026-03-20 07:28:58 +00:00
2 changed files with 11 additions and 6 deletions

View file

@ -192,17 +192,19 @@ function Install-UnslothStudio {
# Launch studio automatically in interactive terminals;
# in non-interactive environments (CI, Docker) just print instructions.
$LaunchCmd = ".\${VenvName}\Scripts\unsloth.exe studio -H 0.0.0.0 -p 8888"
$IsInteractive = [Environment]::UserInteractive -and (-not [Console]::IsInputRedirected)
if ($IsInteractive) {
Write-Host "==> Launching Unsloth Studio..."
Write-Host " To relaunch later, run:"
Write-Host ""
$UnslothExe = Join-Path $VenvName "Scripts\unsloth.exe"
& $UnslothExe studio -H 0.0.0.0 -p 8888
Write-Host " $LaunchCmd"
Write-Host ""
& (Join-Path $VenvName "Scripts\unsloth.exe") studio -H 0.0.0.0 -p 8888
} else {
Write-Host " To launch, run:"
Write-Host ""
Write-Host " .\${VenvName}\Scripts\activate"
Write-Host " unsloth studio -H 0.0.0.0 -p 8888"
Write-Host " $LaunchCmd"
Write-Host ""
}
}

View file

@ -217,14 +217,17 @@ echo ""
# Launch studio automatically in interactive terminals;
# in non-interactive environments (Docker, CI, cloud-init) just print instructions.
LAUNCH_CMD="./${VENV_NAME}/bin/unsloth studio -H 0.0.0.0 -p 8888"
if [ -t 0 ]; then
echo "==> Launching Unsloth Studio..."
echo " To relaunch later, run:"
echo ""
echo " $LAUNCH_CMD"
echo ""
exec "$VENV_NAME/bin/unsloth" studio -H 0.0.0.0 -p 8888
else
echo " To launch, run:"
echo ""
echo " source ${VENV_NAME}/bin/activate"
echo " unsloth studio -H 0.0.0.0 -p 8888"
echo " $LAUNCH_CMD"
echo ""
fi