This repository maps the current four-part Ubuntu Workshop tutorial to one root wrapper and reviewable examples. The wrapper keeps the tutorial's native command arguments intact while making project-directory selection, installation, dry-run, and destructive-operation boundaries explicit.
| Tutorial part | Repository entrypoint | Checked-in material |
|---|---|---|
| Get started | install, init, lifecycle, execution, actions, changes, and tasks |
examples/tutorial/ollama-python-project/.workshop/dev.yaml |
| Work with interfaces | connections, connect, disconnect, remount, and native |
the final dev.yaml interface layout |
| Sketch SDKs | sketch-sdk, sketches, sketch-stash, sketch-restore, sketch-remove, and sketch-eject |
.workshop/console/ in the Python project |
| Craft SDKs | sdkcraft-install, sdkcraft-refresh, and project-aware sdkcraft passthrough |
examples/tutorial/ollama-sdk/ |
The wrapper is a Bash operator entrypoint. It installs or refreshes only the
LXD and Workshop snaps for install; SDKcraft installation is a separate
explicit command. It never runs lxd init, selects host storage or networking,
connects a GPU or mount implicitly, or logs in to or publishes to the SDK
Store. Live Workshop and SDKcraft commands require an approved snap-enabled
host and operator intent.
Use a dry run while reviewing a command:
./workshop-automated-installer.sh --dry-run install
./workshop-automated-installer.sh --dry-run \
--project-dir ./my-project --workshop dev bootstrapTests and CI use fake commands and temporary directories. They do not install snaps, initialize LXD, launch a workshop, download models, contact the SDK Store, build SDK artifacts, or publish an SDK.
The tutorial uses LXD 6 and a classic Workshop snap. The wrapper makes the same prerequisite operations repeatable:
./workshop-automated-installer.sh installSDK Store discovery remains a machine-level query and is passed through unchanged:
./workshop-automated-installer.sh sdk-find ollama
./workshop-automated-installer.sh sdk-info ollamaCreate the project and definition. init creates the directory if necessary,
initializes Git by default, refuses to overwrite an existing definition, and
adds .workshop.lock to .gitignore:
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project \
--workshop dev \
--base ubuntu@22.04 \
--sdks ollama/cpu/stable \
initThe checked-in final definition uses Ubuntu 24.04, the Vulkan Ollama channel,
uv, Jupyter, an in-project console SDK, a loopback tunnel, shared Python
environment wiring, and a reusable model action. Copy it into a new project
when you want the final state without running the earlier scaffold steps:
cp -R examples/tutorial/ollama-python-project ./ollama-python-project-finalUse these wrapper commands for the lifecycle covered in the tutorial:
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project-final --workshop dev list
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project-final --workshop dev launch
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project-final --workshop dev info
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project-final sdk-list
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project-final --workshop dev stop
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project-final --workshop dev start
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project-final --workshop dev refresh
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project-final --workshop dev restoreRun commands, open a shell, and invoke the reusable pull action:
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project-final --workshop dev ollama run tinyllama
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project-final --workshop dev ollama list
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project-final --workshop dev shell
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project-final --workshop dev run -- pull tinyllama
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project-final --workshop dev pull-model tinyllamaTrack atomic changes and their tasks with the wrapper's query commands:
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project-final changes
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project-final tasksRuntime .workshop.lock state must stay in the project directory and out of
version control. The definition and .workshop/ SDK sources are the
reviewable, shareable files.
The final project definition at
examples/tutorial/ollama-python-project/.workshop/dev.yaml includes:
ollama,uv,jupyter, andproject-consoleSDKs;- the
system:jupytertunnel plug at127.0.0.1:8989; - a top-level
jupyter:venvtouv:venvconnection; and - the Ollama SDK's model mount, GPU plug, and API tunnel slot.
Inspect and manage connections through the wrapper:
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project-final native connections
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project-final native connections --all
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project-final native disconnect dev/ollama:models
mkdir -p "$HOME/.ollama/models"
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project-final native remount \
dev/ollama:models "$HOME/.ollama/models"
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project-final native connect dev/ollama:models :mountThe mount, GPU, and tunnel examples affect host resources. Review the target
path and endpoint before applying them. To add or change SDKs and interfaces,
edit .workshop/dev.yaml, then apply the definition explicitly:
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project-final native refreshThe fixture keeps the Jupyter tunnel loopback-only. It does not grant a public listener or select a host mount automatically.
Sketch SDKs are local experiments and do not require SDK Store publication.
The native workshop sketch-sdk flow is available as a root-wrapper command:
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project-final sketch-sdk
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project-final sketch-sdk --stash
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project-final sketch-sdk --restore
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project-final sketchesWhen the sketch is ready to keep, eject it as an in-project SDK and add the
project- entry to the definition:
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project-final sketch-sdk --eject --name console
# Add: - name: project-console to .workshop/dev.yaml
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project-final refreshThe checked-in result is:
examples/tutorial/ollama-python-project/.workshop/console/sdk.yaml
examples/tutorial/ollama-python-project/.workshop/console/hooks/setup-project
To remove a sketch permanently, use the wrapper's explicit confirmation:
./workshop-automated-installer.sh --yes \
--project-dir ./ollama-python-project-final native sketch-sdk --remove
./workshop-automated-installer.sh --yes \
--project-dir ./ollama-python-project-final native removeSDKcraft is installed separately from the Workshop wrapper's default install:
./workshop-automated-installer.sh sdkcraft-install
./workshop-automated-installer.sh sdkcraft-refreshStart a new SDK source tree and initialize it from that directory. The
checked-in ollama-sdk tree is already initialized and contains the edited
definition shown by the tutorial:
mkdir -p /tmp/ollama-sdk
./workshop-automated-installer.sh \
--project-dir /tmp/ollama-sdk sdkcraft initThe checked-in source tree contains metadata for Ubuntu 22.04 and 24.04 amd64, Ollama and service parts, a models mount plug, a GPU plug, an Ollama API tunnel slot, and lifecycle hooks:
examples/tutorial/ollama-sdk/sdkcraft.yaml
examples/tutorial/ollama-sdk/ollama.service
examples/tutorial/ollama-sdk/hooks/setup-base
examples/tutorial/ollama-sdk/hooks/setup-project
examples/tutorial/ollama-sdk/hooks/check-health
Run SDKcraft commands from the selected source directory. The wrapper does not reinterpret or reorder their arguments:
./workshop-automated-installer.sh \
--project-dir examples/tutorial/ollama-sdk sdkcraft clean
./workshop-automated-installer.sh \
--project-dir examples/tutorial/ollama-sdk sdkcraft try
./workshop-automated-installer.sh \
--project-dir examples/tutorial/ollama-sdk sdkcraft testBefore trying a locally built SDK in a Workshop, use the SDKcraft-produced
try-ollama SDK name in a reviewed Workshop definition and launch with the
diagnostic flags described by the tutorial:
./workshop-automated-installer.sh \
--project-dir ./ollama-python-project-final native launch \
--verbose --wait-on-errortry and test can create packed artifacts, provision LXD containers, and
run lifecycle hooks. Those effects are intentionally excluded from repository
CI.
Publication is never automatic. After review and a successful live test, run these commands interactively with an authenticated SDK Store session:
./workshop-automated-installer.sh \
--project-dir examples/tutorial/ollama-sdk sdkcraft login
./workshop-automated-installer.sh \
--project-dir examples/tutorial/ollama-sdk sdkcraft register ollama
./workshop-automated-installer.sh \
--project-dir examples/tutorial/ollama-sdk sdkcraft upload \
./ollama_amd64_ubuntu@24.04.sdk --release latest/betaNever put credentials, tokens, packed .sdk files, model caches, or Store
state in the repository.
Run the complete non-mutating local gate:
bash tests/test-tutorial-fixtures.sh
make workshop-test
make workshop-smokeThe fixture test validates file presence, executable hooks, YAML key structure,
operator-only command boundaries, and absence of credentials and generated
runtime artifacts. make ci and the GitHub workflows include the same smoke
path. Passing these checks does not prove live snap, LXD, Workshop, GPU,
Jupyter, Ollama, Craft Parts, or SDK Store compatibility; use a separately
approved host validation for that evidence.