#!/bin/sh # Lazycow Studio: can this Mac or Linux PC run it? The check before anything is downloaded. Needs only sh and curl. # # One line, in Terminal: # curl -fsSL https://raw.githubusercontent.com/kensaurus/lazycow-studio/main/scripts/bootstrap/doctor.sh | sh # From the studio folder (mac.sh runs this as its step 1): # sh scripts/bootstrap/doctor.sh [--json] [--dir ] # # The core of `npx lazycow doctor` (packages/lazycow/lib/doctor.mjs), same numbers: system and processor type (an Intel # Mac is blocked: PyTorch has had no macOS x86 builds since 2.2), processor threads, memory, free disk where the studio # goes, and whether each download host answers (HEAD, 5 s, all at once). Exit code 0 READY, 1 SLOW, 2 BLOCKED. # Plain POSIX sh (dash, bash, zsh's sh) and ASCII. JSON=0 DIR="$HOME" while [ $# -gt 0 ]; do case "$1" in --json) JSON=1 ;; --dir) shift; DIR="${1:-$HOME}" ;; esac shift done # The studio's limits (server/health.mjs LIMITS) and the install's needs (doctor.mjs INSTALL). THREADS_MIN=4; THREADS_SLOW=8 RAM_MIN=6; RAM_SLOW=12 INSTALL_GB=6; RENDERS_GB=20 DOWNLOAD_GB=1.3 TOP=0 LINES="" JCHECKS="" nl=' ' # check