Skip to content

start.sh: Freefield on Linux in one line, as start.ps1 does on Windows - #25

Merged
neuregex merged 1 commit into
mainfrom
start-sh
Nov 28, 2026
Merged

neuregex merged 1 commit into
mainfrom
start-sh

Conversation

@neuregex

Copy link
Copy Markdown
Owner

Linux gets the same one line as Windows:

curl -fsSL https://raw.githubusercontent.com/neuregex/freefield/main/start.sh | bash

start.sh is the Linux twin of start.ps1:

  • It checks the NVIDIA GPU and its driver (CUDA 13, an RTX 20 series card or newer), Docker Engine and the NVIDIA
    Container Toolkit. It never runs sudo: what is missing, it names with its link (the docker group,
    systemctl start docker, the toolkit's two commands).
  • It warns when Docker keeps its data on a hard disk, or has less than 16 GB of RAM.
  • It pulls the image and runs it on 127.0.0.1 (port 3000, or the next free one up to 3020) with the models in the
    freefield volume. HF_TOKEN and FREEFIELD_PACKS reach the container through the environment, never on the
    command line.
  • It follows the download in the terminal and opens the studio with its passcode. Enter stops Freefield; Ctrl+C leaves
    it running.
  • A new image recreates the container with the same environment and port; the same image only starts it again.
  • When Freefield stops while it loads, it shows the end of the log (with the memory hint when Docker says it ran out)
    and saves the whole log with the passcode and token removed.
  • A copy stays in ~/.local/share/freefield/start.sh, for stop, logs and uninstall.
  • In WSL 2 with Docker Desktop it works too: there is no toolkit or disk check there, the studio opens in Windows'
    browser, and the GPU and memory hints are Docker Desktop's.

The README ("On your own PC in one line" and the "Run it" table) and docs/cloud-gpus.md show the line; image.yml
ignores start.sh, as it ignores start.ps1.

How it was checked

  • test/start-sh.test.ts: 13 cases against a fake docker, nvidia-smi, xdg-open and curl, each in its own session
    (setsid), as in a pipe. npm test: 86 pass.
  • By hand, with the same fakes: through a pipe (bash -s --) it leaves Freefield running and says how to stop it;
    with a terminal (script), Enter stops it.
  • shellcheck start.sh is clean. npm run validate and npm run typecheck pass; python tools/catalog.py all
    changes nothing.
  • Merged with README: Infistar's new logo strip #23 and with the Discord badge branch in a copy: no conflicts.
  • Still to do before merging: a run on a real Linux PC with an NVIDIA card, from this branch:
    curl -fsSL https://raw.githubusercontent.com/neuregex/freefield/start-sh/start.sh | FREEFIELD_LAUNCHER_REF=start-sh bash

🤖 Generated with Claude Code

https://claude.ai/code/session_01PgVaGwFeiCrXjWTRomMwRX

curl -fsSL https://raw.githubusercontent.com/neuregex/freefield/main/start.sh | bash

It checks the NVIDIA GPU, its driver (CUDA 13), Docker Engine and the NVIDIA Container
Toolkit, warns when Docker keeps its data on a hard disk or the computer has little RAM,
pulls the image and runs it on 127.0.0.1 (3000, or the next free port up to 3020) with the
models in the "freefield" volume, follows the download in the terminal and opens the
studio with its passcode. Enter stops it; Ctrl+C leaves it running. A new image recreates
the container with the same environment and port; the same image only starts it again.

It never runs sudo: what is missing, it names with its link (docker group, systemctl, the
toolkit's two commands). HF_TOKEN goes to the container through the environment, never on
the command line, and the saved log of a failed start has the passcode and token removed.
A copy stays in ~/.local/share/freefield/start.sh for stop, logs and uninstall.

In WSL 2 with Docker Desktop it works too: no toolkit or disk check there (Docker Desktop
reaches the GPU itself and keeps its data in its own VM), the studio opens in Windows'
browser, and the GPU and memory hints are Docker Desktop's.

test/start-sh.test.ts runs it against a fake docker, nvidia-smi, xdg-open and curl in
their own session, as in a pipe: 13 cases. The README and the Docker guide show the line;
the image workflow ignores start.sh, as it ignores start.ps1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PgVaGwFeiCrXjWTRomMwRX
@neuregex
neuregex merged commit 13a4012 into main Nov 28, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant