Merge pull request #71 from unslothai/fix/frontend-default-path
Fix/frontend default path
This commit is contained in:
commit
957e39c50d
2 changed files with 7 additions and 6 deletions
9
setup.sh
9
setup.sh
|
|
@ -95,12 +95,13 @@ echo "✅ Python dependencies installed"
|
|||
# This alias hardcodes the venv python path so users don't need to activate.
|
||||
echo ""
|
||||
REPO_DIR="$SCRIPT_DIR"
|
||||
ALIAS_LINE="unsloth-ui() { ${REPO_DIR}/.venv/bin/python ${REPO_DIR}/cli.py ui -f ${REPO_DIR}/studio/frontend/dist \"\$@\"; }"
|
||||
|
||||
if ! grep -qF "unsloth-ui" ~/.bashrc 2>/dev/null; then
|
||||
echo "" >> ~/.bashrc
|
||||
echo "# Unsloth Studio launcher" >> ~/.bashrc
|
||||
echo "$ALIAS_LINE" >> ~/.bashrc
|
||||
cat >> ~/.bashrc <<UNSLOTH_EOF
|
||||
|
||||
# Unsloth Studio launcher
|
||||
alias unsloth-ui='${REPO_DIR}/.venv/bin/python ${REPO_DIR}/cli.py ui -f ${REPO_DIR}/studio/frontend/dist'
|
||||
UNSLOTH_EOF
|
||||
echo "✅ Alias 'unsloth-ui' added to ~/.bashrc"
|
||||
else
|
||||
echo "✅ Alias 'unsloth-ui' already exists in ~/.bashrc"
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ def _resolve_external_ip() -> str:
|
|||
def run_server(
|
||||
host: str = "0.0.0.0",
|
||||
port: int = 8000,
|
||||
frontend_path: Path = "../frontend/dist",
|
||||
frontend_path: Path = "studio/frontend/dist",
|
||||
silent: bool = False,
|
||||
):
|
||||
"""
|
||||
|
|
@ -124,7 +124,7 @@ if __name__ == "__main__":
|
|||
parser.add_argument("--host", default="0.0.0.0", help="Host to bind to")
|
||||
parser.add_argument("--port", type=int, default=8000, help="Port to bind to")
|
||||
parser.add_argument(
|
||||
"--frontend", type=str, default="../frontend/dist", help="Path to frontend build"
|
||||
"--frontend", type=str, default="studio/frontend/dist", help="Path to frontend build"
|
||||
)
|
||||
parser.add_argument("--silent", action="store_true", help="Suppress output")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue