Compare commits
4 commits
main
...
fix/colab-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
83309560a9 | ||
|
|
f5c33c1594 | ||
|
|
95dc2c0de5 | ||
|
|
c816455615 |
2 changed files with 156 additions and 170 deletions
|
|
@ -64,11 +64,7 @@
|
||||||
"id": "27e68f91"
|
"id": "27e68f91"
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": "!git clone --depth 1 --branch main https://github.com/unslothai/unsloth.git\n%cd /content/unsloth\n!chmod +x studio/setup.sh && ./studio/setup.sh --local"
|
||||||
"!git clone --depth 1 --branch main https://github.com/unslothai/unsloth.git\n",
|
|
||||||
"%cd /content/unsloth\n",
|
|
||||||
"!chmod +x studio/setup.sh && ./studio/setup.sh"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
|
|
|
||||||
|
|
@ -337,30 +337,20 @@ fast_install() {
|
||||||
|
|
||||||
cd "$SCRIPT_DIR"
|
cd "$SCRIPT_DIR"
|
||||||
|
|
||||||
# On Colab without a venv, skip all venv-dependent sections (Python deps
|
# On Colab without a venv, skip venv-dependent Python deps sections but
|
||||||
# update, llama.cpp build) -- the backend deps were already installed above.
|
# continue to llama.cpp install so GGUF inference is available.
|
||||||
if [ "$_COLAB_NO_VENV" = true ]; then
|
if [ "$_COLAB_NO_VENV" = true ]; then
|
||||||
echo "✅ Studio backend dependencies installed into system Python"
|
echo "✅ Studio backend dependencies installed into system Python"
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "╔══════════════════════════════════════╗"
|
|
||||||
echo "║ Setup Complete! ║"
|
|
||||||
echo "╠══════════════════════════════════════╣"
|
|
||||||
echo "║ Unsloth Studio is ready to start ║"
|
|
||||||
echo "║ in your Colab notebook! ║"
|
|
||||||
echo "║ ║"
|
|
||||||
echo "║ from colab import start ║"
|
|
||||||
echo "║ start() ║"
|
|
||||||
echo "╚══════════════════════════════════════╝"
|
|
||||||
exit 0
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ── Check if Python deps need updating ──
|
# ── Check if Python deps need updating ──
|
||||||
# Compare installed package version against PyPI latest.
|
# Compare installed package version against PyPI latest.
|
||||||
# Skip all Python dependency work if versions match (fast update path).
|
# Skip all Python dependency work if versions match (fast update path).
|
||||||
_PKG_NAME="${STUDIO_PACKAGE_NAME:-unsloth}"
|
# On Colab (no venv), skip this version check (it needs $VENV_DIR/bin/python)
|
||||||
|
# but still run install_python_stack below (it uses sys.executable).
|
||||||
_SKIP_PYTHON_DEPS=false
|
_SKIP_PYTHON_DEPS=false
|
||||||
if [ "${SKIP_STUDIO_BASE:-0}" != "1" ] && [ "${STUDIO_LOCAL_INSTALL:-0}" != "1" ]; then
|
_PKG_NAME="${STUDIO_PACKAGE_NAME:-unsloth}"
|
||||||
|
if [ "$_COLAB_NO_VENV" != true ] && [ "${SKIP_STUDIO_BASE:-0}" != "1" ] && [ "${STUDIO_LOCAL_INSTALL:-0}" != "1" ]; then
|
||||||
# Only check when NOT called from install.sh (which just installed the package)
|
# Only check when NOT called from install.sh (which just installed the package)
|
||||||
INSTALLED_VER=$("$VENV_DIR/bin/python" -c "
|
INSTALLED_VER=$("$VENV_DIR/bin/python" -c "
|
||||||
from importlib.metadata import version
|
from importlib.metadata import version
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue