Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fe568c17cd | |||
| e915d87ec6 |
@@ -23,15 +23,16 @@ This project builds a student-friendly local lab environment for the courseware
|
||||
|
||||
Lab 1 is now provisioned directly by the installer:
|
||||
|
||||
- The `Qwen3-0.6B-Q8_0.gguf` and `Llama-3.2-1B.Q4_K_M.gguf` files are mirrored into `state/models/lab1/`.
|
||||
- The Qwen GGUF is pre-registered in Ollama as `lab1-qwen3-0.6b-q8_0`.
|
||||
- The wiki serves same-host download links for both GGUFs through `/api/lab1/models/...`.
|
||||
- The `Llama-3.2-1B.Q4_K_M.gguf` file is mirrored into `state/models/lab1/`.
|
||||
- The Lab 1 confidence widget uses the pre-pulled Gemma 4 E2B Q4 Ollama model, `batiai/gemma4-e2b:q4`.
|
||||
- The wiki serves a same-host download link for the Llama GGUF through `/api/lab1/models/...`.
|
||||
- Lab 1 confidence visualization requires Ollama `0.12.11` or newer because it depends on logprobs.
|
||||
|
||||
## Lab 2 Defaults
|
||||
|
||||
`./labctl up` now pre-pulls the Lab 2 Gemma 4 E2B Ollama variants used by the wiki widget:
|
||||
`./labctl up` now pre-pulls the Gemma 4 E2B Ollama variants used by the wiki widgets:
|
||||
|
||||
- `cajina/gemma4_e2b-q2_k_xl:v01`
|
||||
- `batiai/gemma4-e2b:q4`
|
||||
- `batiai/gemma4-e2b:q6`
|
||||
|
||||
@@ -39,15 +40,13 @@ If you want to re-pull just those managed Ollama models later, run `./labctl oll
|
||||
|
||||
## Supported Host Profiles
|
||||
|
||||
This build intentionally avoids the reference VM's hardware workarounds.
|
||||
This build is the Linux/WSL variant of LLM Labs Local. If you are deploying on Apple Silicon macOS, use the sibling `LLM-Labs-Local-Mac` project instead.
|
||||
|
||||
- macOS: Apple Silicon only, with at least 16 GB unified memory.
|
||||
- Native Debian/Ubuntu: Debian-family Linux with an NVIDIA GPU visible to `nvidia-smi` and at least 8 GB VRAM.
|
||||
- WSL: Debian/Ubuntu-family Linux running under WSL, with the NVIDIA GPU exposed into the distro.
|
||||
|
||||
The launcher and Ansible preflight classify the host dynamically and apply different setup behavior for:
|
||||
|
||||
- `macos`
|
||||
- `native-debian-ubuntu`
|
||||
- `wsl`
|
||||
|
||||
@@ -97,7 +96,7 @@ If CUDA is already mounted or preinstalled outside `PATH`, the installer detects
|
||||
|
||||
- The default deployment is centered on Ollama-backed local inference and browser-based tools such as Netron and the wiki.
|
||||
- Netron is installed into a managed Python virtual environment and served locally instead of being provisioned as a desktop package.
|
||||
- Lab 1 model downloads are mirrored locally during `./labctl up`, so students do not have to fetch them manually from the original source.
|
||||
- Lab 1's Llama GGUF download is mirrored locally during `./labctl up`, so students do not have to fetch it manually from the original source.
|
||||
- WhiteRabbitNeo assets remain a separate Lab 2 flow and are still handled outside the default `./labctl up` run.
|
||||
- Run `./labctl assets lab2` when you want to populate repo-local Lab 2 assets in `assets/lab2/` from Hugging Face.
|
||||
- After base setup, run `state/lab2/download_whiterabbitneo-gguf.sh` to fetch only the `Q4_K_M`, `Q8_0`, and `IQ2_M` files from `bartowski/WhiteRabbitNeo_WhiteRabbitNeo-V3-7B-GGUF` and register local Ollama models `WhiteRabbitNeo`, `WhiteRabbitNeo-Q4`, `WhiteRabbitNeo-Q8`, and `WhiteRabbitNeo-IQ2`.
|
||||
@@ -145,4 +144,4 @@ The deployment will:
|
||||
- Lab 2 includes `state/lab2/download_whiterabbitneo-gguf.sh`, which uses `git` + `git lfs` to pull only the supported WhiteRabbitNeo quants. Add `--download-only` if you want the files without Ollama registration.
|
||||
- The wiki is cloned from `https://git.zuccaro.me/bzuccaro/LLM-Labs.git` into `state/repos/LLM-Labs` and started with `npm`.
|
||||
- `./labctl down` uninstalls Ollama entirely when this project installed it, instead of only stopping the service.
|
||||
- Unsloth Studio currently supports chat and data workflows on macOS; Linux/WSL remains the standard path for NVIDIA-backed training.
|
||||
- This variant is intended for NVIDIA-backed Linux/WSL training and lab workflows.
|
||||
|
||||
@@ -50,10 +50,7 @@ courseware_wiki_repo: "https://git.zuccaro.me/bzuccaro/LLM-Labs.git"
|
||||
|
||||
courseware_open_webui_spec: "open-webui"
|
||||
courseware_embedding_atlas_spec: "embedding-atlas"
|
||||
courseware_lab1_qwen_filename: "Qwen3-0.6B-Q8_0.gguf"
|
||||
courseware_lab1_qwen_download_url: "https://huggingface.co/Qwen/Qwen3-0.6B-GGUF/resolve/main/Qwen3-0.6B-Q8_0.gguf?download=true"
|
||||
courseware_lab1_qwen_local_path: "{{ courseware_lab1_models_dir }}/{{ courseware_lab1_qwen_filename }}"
|
||||
courseware_lab1_qwen_model_alias: "lab1-qwen3-0.6b-q8_0"
|
||||
courseware_lab1_ollama_model_alias: "batiai/gemma4-e2b:q4"
|
||||
courseware_lab1_llama_filename: "Llama-3.2-1B.Q4_K_M.gguf"
|
||||
courseware_lab1_llama_download_url: "https://huggingface.co/DevQuasar-3/meta-llama.Llama-3.2-1B-GGUF/resolve/main/Llama-3.2-1B.Q4_K_M.gguf?download=true"
|
||||
courseware_lab1_llama_local_path: "{{ courseware_lab1_models_dir }}/{{ courseware_lab1_llama_filename }}"
|
||||
@@ -74,6 +71,8 @@ courseware_white_rabbit_variants:
|
||||
quant: "IQ2_M"
|
||||
filename: "WhiteRabbitNeo_WhiteRabbitNeo-V3-7B-IQ2_M.gguf"
|
||||
courseware_lab2_ollama_models:
|
||||
- label: "Gemma 4 E2B Q2 XL"
|
||||
value: "cajina/gemma4_e2b-q2_k_xl:v01"
|
||||
- label: "Gemma 4 E2B Q4"
|
||||
value: "batiai/gemma4-e2b:q4"
|
||||
- label: "Gemma 4 E2B Q6"
|
||||
|
||||
@@ -140,22 +140,6 @@
|
||||
- courseware_down_ollama_marker.stat.exists
|
||||
failed_when: false
|
||||
|
||||
- name: Stop courseware-managed Ollama macOS app if running
|
||||
command: pkill -x Ollama
|
||||
when:
|
||||
- ansible_system == "Darwin"
|
||||
- courseware_down_ollama_marker.stat.exists
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
- name: Uninstall courseware-managed Ollama Homebrew formula
|
||||
command: brew uninstall ollama
|
||||
when:
|
||||
- ansible_system == "Darwin"
|
||||
- courseware_down_ollama_marker.stat.exists
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
- name: Remove managed Unsloth path
|
||||
file:
|
||||
path: "{{ ansible_env.HOME }}/.unsloth"
|
||||
|
||||
@@ -12,10 +12,3 @@ common_packages_debian:
|
||||
- ninja-build
|
||||
- libssl-dev
|
||||
- pkg-config
|
||||
|
||||
common_packages_macos:
|
||||
- python3
|
||||
- git
|
||||
- curl
|
||||
- cmake
|
||||
- ninja
|
||||
|
||||
@@ -20,17 +20,6 @@
|
||||
when: ansible_os_family == "Debian"
|
||||
become: yes
|
||||
|
||||
- name: Ensure Homebrew is installed (macOS)
|
||||
ansible.builtin.homebrew:
|
||||
name:
|
||||
- python3
|
||||
- git
|
||||
- curl
|
||||
- cmake
|
||||
- ninja
|
||||
state: present
|
||||
when: ansible_os_family == "Darwin"
|
||||
|
||||
- name: Install Python virtual environment module (user space)
|
||||
ansible.builtin.pip:
|
||||
name: virtualenv
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
- name: Download Kiln macOS disk image
|
||||
get_url:
|
||||
url: "https://github.com/Kiln-AI/Kiln/releases/download/{{ courseware_kiln_release_tag }}/Kiln.MacOS.AppleSilicon.M-Processor.dmg"
|
||||
dest: "{{ courseware_downloads_dir }}/Kiln.MacOS.AppleSilicon.M-Processor.dmg"
|
||||
mode: "0644"
|
||||
|
||||
- name: Install Kiln.app into project state
|
||||
shell: |
|
||||
set -euo pipefail
|
||||
mount_point=$(mktemp -d /tmp/kiln.XXXXXX)
|
||||
hdiutil attach "{{ courseware_downloads_dir }}/Kiln.MacOS.AppleSilicon.M-Processor.dmg" -mountpoint "$mount_point" -nobrowse -quiet
|
||||
app_path=$(find "$mount_point" -maxdepth 1 -name '*.app' | head -n 1)
|
||||
rm -rf "{{ courseware_apps_dir }}/Kiln.app"
|
||||
cp -R "$app_path" "{{ courseware_apps_dir }}/Kiln.app"
|
||||
hdiutil detach "$mount_point" -quiet
|
||||
rmdir "$mount_point"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
creates: "{{ courseware_apps_dir }}/Kiln.app"
|
||||
@@ -1,8 +1,3 @@
|
||||
- name: Install Kiln on Linux
|
||||
include_tasks: linux.yml
|
||||
when: ansible_system == "Linux"
|
||||
|
||||
- name: Install Kiln on macOS
|
||||
include_tasks: macos.yml
|
||||
when: ansible_system == "Darwin"
|
||||
|
||||
|
||||
@@ -31,41 +31,8 @@
|
||||
- courseware_lab1_ollama_semver | length == 0
|
||||
or not (courseware_lab1_ollama_semver is version(courseware_ollama_min_version, '>='))
|
||||
|
||||
- name: Download mirrored Lab 1 Qwen model
|
||||
get_url:
|
||||
url: "{{ courseware_lab1_qwen_download_url }}"
|
||||
dest: "{{ courseware_lab1_qwen_local_path }}"
|
||||
mode: "0644"
|
||||
|
||||
- name: Download mirrored Lab 1 Llama model
|
||||
get_url:
|
||||
url: "{{ courseware_lab1_llama_download_url }}"
|
||||
dest: "{{ courseware_lab1_llama_local_path }}"
|
||||
mode: "0644"
|
||||
|
||||
- name: Write Lab 1 Ollama Modelfile
|
||||
copy:
|
||||
dest: "{{ courseware_lab1_dir }}/Modelfile.{{ courseware_lab1_qwen_model_alias }}"
|
||||
mode: "0644"
|
||||
content: |
|
||||
FROM {{ courseware_lab1_qwen_local_path }}
|
||||
|
||||
- name: Start Ollama before Lab 1 model registration
|
||||
command:
|
||||
argv:
|
||||
- "{{ courseware_root }}/scripts/service_manager.sh"
|
||||
- start
|
||||
- ollama
|
||||
changed_when: false
|
||||
|
||||
- name: Register Lab 1 Qwen model with Ollama
|
||||
command:
|
||||
argv:
|
||||
- "{{ courseware_ollama_bin }}"
|
||||
- create
|
||||
- "{{ courseware_lab1_qwen_model_alias }}"
|
||||
- -f
|
||||
- "{{ courseware_lab1_dir }}/Modelfile.{{ courseware_lab1_qwen_model_alias }}"
|
||||
environment:
|
||||
OLLAMA_HOST: "{{ courseware_bind_host }}:{{ courseware_ports.ollama }}"
|
||||
OLLAMA_MODELS: "{{ courseware_ollama_models_dir }}"
|
||||
|
||||
@@ -23,18 +23,6 @@
|
||||
gpu_type: "{{ 'nvidia' if nvidia_smi_output.rc == 0 else 'none' }}"
|
||||
when: is_wsl | default(false) or ansible_os_family == "Debian"
|
||||
|
||||
- name: Check for Metal GPU on macOS
|
||||
ansible.builtin.command: system_profiler SPDisplaysDataType
|
||||
register: metal_check
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
when: ansible_os_family == "Darwin"
|
||||
|
||||
- name: Set GPU type for macOS
|
||||
ansible.builtin.set_fact:
|
||||
gpu_type: "metal"
|
||||
when: ansible_os_family == "Darwin" and metal_check.rc == 0
|
||||
|
||||
- name: Display detected GPU type
|
||||
ansible.builtin.debug:
|
||||
msg: "llama.cpp GPU type: {{ gpu_type | default('none') }}"
|
||||
@@ -58,7 +46,6 @@
|
||||
{{
|
||||
not llama_cpp_stat.stat.exists or
|
||||
(gpu_type == 'nvidia' and existing_gpu_check.stdout != 'cuda') or
|
||||
(gpu_type == 'metal' and existing_gpu_check.stdout != 'metal') or
|
||||
(gpu_type == 'amd' and existing_gpu_check.stdout != 'amd')
|
||||
}}
|
||||
|
||||
@@ -120,19 +107,6 @@
|
||||
when: gpu_type == 'amd' and cmake_configured.rc != 0
|
||||
become: no
|
||||
|
||||
- name: Configure llama.cpp for Metal (macOS)
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- cmake
|
||||
- ..
|
||||
- -G Ninja
|
||||
- -DCMAKE_BUILD_TYPE=Release
|
||||
- -DGGML_METAL=on
|
||||
args:
|
||||
chdir: "{{ llmlab_base }}/lab2/llama.cpp/build"
|
||||
when: gpu_type == 'metal' and cmake_configured.rc != 0
|
||||
become: no
|
||||
|
||||
- name: Configure llama.cpp for CPU only
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
|
||||
- name: Set llama.cpp backend flag
|
||||
set_fact:
|
||||
courseware_llama_backend_flag: "{{ '-DGGML_METAL=ON' if ansible_system == 'Darwin' else '-DGGML_CUDA=ON' }}"
|
||||
courseware_llama_backend_flag: "-DGGML_CUDA=ON"
|
||||
|
||||
- name: Set llama.cpp build parallelism
|
||||
set_fact:
|
||||
|
||||
@@ -16,14 +16,6 @@
|
||||
become: yes
|
||||
notify: Start Ollama service
|
||||
|
||||
- name: Install Ollama (macOS via Homebrew)
|
||||
ansible.builtin.homebrew:
|
||||
name: ollama
|
||||
state: present
|
||||
when:
|
||||
- ansible_os_family == "Darwin"
|
||||
- ollama_version_check.rc != 0
|
||||
|
||||
- name: Check if Ollama service exists
|
||||
ansible.builtin.command: systemctl list-unit-files ollama.service
|
||||
register: ollama_service_check
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
- name: Check installed Homebrew formulas
|
||||
command: "brew list --versions {{ item }}"
|
||||
loop:
|
||||
- git
|
||||
- git-lfs
|
||||
- cmake
|
||||
- node
|
||||
- python@3.11
|
||||
- ollama
|
||||
register: courseware_brew_checks
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
- name: Install missing Homebrew formulas
|
||||
command: "brew install {{ item.item }}"
|
||||
loop: "{{ courseware_brew_checks.results }}"
|
||||
when: item.rc != 0
|
||||
|
||||
- name: Mark Ollama as installed by courseware on macOS
|
||||
file:
|
||||
path: "{{ courseware_ollama_install_marker }}"
|
||||
state: touch
|
||||
mode: "0644"
|
||||
when:
|
||||
- courseware_brew_checks.results
|
||||
| selectattr('item', 'equalto', 'ollama')
|
||||
| selectattr('rc', 'ne', 0)
|
||||
| list
|
||||
| length > 0
|
||||
@@ -1,8 +1,3 @@
|
||||
- name: Install macOS prerequisites
|
||||
include_tasks: macos.yml
|
||||
when: ansible_system == "Darwin"
|
||||
|
||||
- name: Install Linux prerequisites
|
||||
include_tasks: linux.yml
|
||||
when: ansible_system == "Linux"
|
||||
|
||||
|
||||
@@ -1,56 +1,14 @@
|
||||
- name: Classify supported host profile
|
||||
set_fact:
|
||||
courseware_is_macos: "{{ ansible_system == 'Darwin' }}"
|
||||
courseware_is_linux: "{{ ansible_system == 'Linux' }}"
|
||||
courseware_is_wsl: "{{ 'microsoft' in ansible_kernel | lower or 'wsl' in ansible_kernel | lower }}"
|
||||
courseware_is_native_linux: "{{ ansible_system == 'Linux' and not ('microsoft' in ansible_kernel | lower or 'wsl' in ansible_kernel | lower) }}"
|
||||
courseware_host_profile: "{{ 'macos' if ansible_system == 'Darwin' else ('wsl' if ('microsoft' in ansible_kernel | lower or 'wsl' in ansible_kernel | lower) else ('native-debian-ubuntu' if ansible_system == 'Linux' and ansible_os_family == 'Debian' else 'unsupported')) }}"
|
||||
courseware_host_profile: "{{ 'wsl' if ansible_system == 'Linux' and ('microsoft' in ansible_kernel | lower or 'wsl' in ansible_kernel | lower) else ('native-debian-ubuntu' if ansible_system == 'Linux' and ansible_os_family == 'Debian' else 'unsupported') }}"
|
||||
|
||||
- name: Fail on unsupported operating systems
|
||||
fail:
|
||||
msg: "Supported platforms are Apple Silicon macOS and Debian-family Linux/WSL."
|
||||
when: ansible_system not in ["Darwin", "Linux"]
|
||||
|
||||
- name: Fail on unsupported macOS architecture
|
||||
fail:
|
||||
msg: "This installer supports Apple Silicon Macs only."
|
||||
when:
|
||||
- ansible_system == "Darwin"
|
||||
- ansible_architecture not in ["arm64", "aarch64"]
|
||||
|
||||
- name: Fail on undersized macOS systems
|
||||
fail:
|
||||
msg: "This courseware assumes a modern Apple Silicon Mac with at least 16 GB of unified memory."
|
||||
when:
|
||||
- ansible_system == "Darwin"
|
||||
- (ansible_memtotal_mb | int) < 16000
|
||||
|
||||
- name: Check for Xcode command line tools
|
||||
command: xcode-select -p
|
||||
register: courseware_xcode_select
|
||||
changed_when: false
|
||||
when: ansible_system == "Darwin"
|
||||
|
||||
- name: Check for Homebrew
|
||||
command: which brew
|
||||
register: courseware_brew_check
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
when: ansible_system == "Darwin"
|
||||
|
||||
- name: Fail when Xcode command line tools are missing
|
||||
fail:
|
||||
msg: "Install Xcode Command Line Tools first with 'xcode-select --install'."
|
||||
when:
|
||||
- ansible_system == "Darwin"
|
||||
- courseware_xcode_select.rc != 0
|
||||
|
||||
- name: Fail when Homebrew is missing
|
||||
fail:
|
||||
msg: "Install Homebrew first from https://brew.sh/."
|
||||
when:
|
||||
- ansible_system == "Darwin"
|
||||
- courseware_brew_check.rc != 0
|
||||
msg: "Supported platforms are Debian-family Linux and WSL."
|
||||
when: courseware_host_profile == "unsupported"
|
||||
|
||||
- name: Fail on unsupported Linux family
|
||||
fail:
|
||||
@@ -330,6 +288,5 @@
|
||||
|
||||
- name: Set runtime binary defaults
|
||||
set_fact:
|
||||
courseware_python_bin: >-
|
||||
{{ '/opt/homebrew/opt/python@3.11/bin/python3.11' if ansible_system == 'Darwin' else '/usr/bin/python3' }}
|
||||
courseware_python_bin: "/usr/bin/python3"
|
||||
courseware_ollama_bin: "ollama"
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
|
||||
- name: Determine Miniforge platform suffix
|
||||
set_fact:
|
||||
courseware_transformerlab_miniforge_platform: "{{ 'Linux-x86_64' if ansible_system == 'Linux' and ansible_architecture == 'x86_64' else 'Linux-aarch64' if ansible_system == 'Linux' and ansible_architecture in ['aarch64', 'arm64'] else 'MacOSX-arm64' if ansible_system == 'Darwin' and ansible_architecture == 'arm64' else 'MacOSX-x86_64' if ansible_system == 'Darwin' and ansible_architecture == 'x86_64' else 'unsupported' }}"
|
||||
courseware_transformerlab_miniforge_platform: "{{ 'Linux-x86_64' if ansible_system == 'Linux' and ansible_architecture == 'x86_64' else 'Linux-aarch64' if ansible_system == 'Linux' and ansible_architecture in ['aarch64', 'arm64'] else 'unsupported' }}"
|
||||
|
||||
- name: Fail for unsupported Miniforge platform
|
||||
fail:
|
||||
@@ -210,7 +210,7 @@
|
||||
elif [ "$accelerator" = "rocm" ]; then
|
||||
wheel_args+=(--index https://download.pytorch.org/whl/rocm6.4 --index-strategy unsafe-best-match)
|
||||
extra="rocm"
|
||||
elif [ "{{ ansible_system }}" != "Darwin" ]; then
|
||||
else
|
||||
wheel_args+=(--index https://download.pytorch.org/whl/cpu --index-strategy unsafe-best-match)
|
||||
fi
|
||||
|
||||
|
||||
@@ -26,9 +26,8 @@ EMBEDDING_ATLAS_VENV="{{ courseware_venvs_dir }}/embedding-atlas"
|
||||
TTPS_DATASET_PATH="{{ courseware_datasets_dir }}/ttps_dataset.parquet"
|
||||
WIKI_TEST_RAW_PATH="{{ courseware_datasets_dir }}/wiki.test.raw"
|
||||
COURSEWARE_OLLAMA_BASE_URL="http://{{ courseware_url_host }}:{{ courseware_ports.ollama }}"
|
||||
COURSEWARE_LAB1_QWEN_MODEL_PATH="{{ courseware_lab1_qwen_local_path }}"
|
||||
COURSEWARE_LAB1_LLAMA_MODEL_PATH="{{ courseware_lab1_llama_local_path }}"
|
||||
COURSEWARE_LAB1_OLLAMA_MODEL_ALIAS="{{ courseware_lab1_qwen_model_alias }}"
|
||||
COURSEWARE_LAB1_OLLAMA_MODEL_ALIAS="{{ courseware_lab1_ollama_model_alias }}"
|
||||
UNSLOTH_BIN="{{ ansible_env.HOME }}/.local/bin/unsloth"
|
||||
PROMPTFOO_DIR="{{ courseware_promptfoo_dir }}"
|
||||
PROMPTFOO_BIN="{{ courseware_tools_dir }}/promptfoo/node_modules/.bin/promptfoo"
|
||||
@@ -36,5 +35,4 @@ WIKI_DIR="{{ courseware_wiki_repo_dir }}"
|
||||
WIKI_RUNTIME_CONFIG_PATH="{{ courseware_wiki_runtime_config_path }}"
|
||||
LLAMA_CPP_BIN_DIR="{{ courseware_llama_cpp_bin_dir }}"
|
||||
KILN_LINUX_BIN="{{ courseware_apps_dir }}/kiln/Kiln"
|
||||
KILN_MAC_APP="{{ courseware_apps_dir }}/Kiln.app"
|
||||
KILN_LAUNCH_PATH="{% if ansible_system == 'Darwin' %}{{ courseware_apps_dir }}/Kiln.app{% else %}{{ courseware_apps_dir }}/kiln/Kiln{% endif %}"
|
||||
KILN_LAUNCH_PATH="{{ courseware_apps_dir }}/kiln/Kiln"
|
||||
|
||||
@@ -84,8 +84,8 @@ WARNING: THIS SCRIPT WILL CONFIGURE YOUR ENVIRONMENT WILL THE FOLLOWING SOFTWARE
|
||||
- Unsloth Studio
|
||||
- Kiln Desktop
|
||||
- Course-specific support assets for lab 1, lab 2, and lab 4
|
||||
- Pre-pulled Lab 2 Ollama models for Q4 and Q6 Gemma 4 E2B
|
||||
- A pre-registered Lab 1 Ollama model (requires Ollama ${min_ollama}+)
|
||||
- Pre-pulled Gemma 4 E2B Ollama models for Lab 1 and Lab 2
|
||||
- Lab 1 confidence support through Gemma 4 E2B Q4 (requires Ollama ${min_ollama}+)
|
||||
|
||||
IT IS RECOMMENDED TO RUN THIS IN AN ISLOATED ENVIRONMENT (Dedicated WSL, VM, etc.)
|
||||
|
||||
@@ -109,8 +109,8 @@ WARNING: THIS SCRIPT WILL CONFIGURE YOUR ENVIRONMENT WILL THE FOLLOWING SOFTWARE
|
||||
- Unsloth Studio
|
||||
- Kiln Desktop
|
||||
- Course-specific support assets for lab 1, lab 2, and lab 4
|
||||
- Pre-pulled Lab 2 Ollama models for Q4 and Q6 Gemma 4 E2B
|
||||
- A pre-registered Lab 1 Ollama model (requires Ollama ${min_ollama}+)
|
||||
- Pre-pulled Gemma 4 E2B Ollama models for Lab 1 and Lab 2
|
||||
- Lab 1 confidence support through Gemma 4 E2B Q4 (requires Ollama ${min_ollama}+)
|
||||
|
||||
IT IS RECOMMENDED TO RUN THIS IN AN ISLOATED ENVIRONMENT (Dedicated WSL, VM, etc.)
|
||||
|
||||
@@ -132,29 +132,16 @@ host_is_wsl() {
|
||||
[ "$(uname -s)" = "Linux" ] && uname -r | grep -qiE 'microsoft|wsl'
|
||||
}
|
||||
|
||||
host_is_macos() {
|
||||
[ "$(uname -s)" = "Darwin" ]
|
||||
}
|
||||
|
||||
host_is_linux() {
|
||||
[ "$(uname -s)" = "Linux" ]
|
||||
}
|
||||
|
||||
host_is_arm_mac() {
|
||||
host_is_macos && [ "$(uname -m)" = "arm64" ]
|
||||
}
|
||||
|
||||
host_profile() {
|
||||
if host_is_wsl; then
|
||||
printf '%s\n' "wsl"
|
||||
return
|
||||
fi
|
||||
|
||||
if host_is_macos; then
|
||||
printf '%s\n' "macos"
|
||||
return
|
||||
fi
|
||||
|
||||
if host_is_linux && host_is_debian_family; then
|
||||
printf '%s\n' "native-debian-ubuntu"
|
||||
return
|
||||
@@ -299,7 +286,6 @@ Python 3 was not found.
|
||||
|
||||
Install it first, then rerun this command:
|
||||
- Debian/Ubuntu/WSL: sudo apt update && sudo apt install -y python3 python3-venv
|
||||
- macOS: brew install python@3.11
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
@@ -401,7 +387,6 @@ Python 3 is installed, but its virtual environment support is still unavailable.
|
||||
|
||||
Install the missing venv package for your platform, then rerun this command:
|
||||
- Debian/Ubuntu/WSL: sudo apt update && sudo apt install -y python3-venv python3-pip
|
||||
- macOS: brew reinstall python@3.11
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
|
||||
+2
-4
@@ -28,9 +28,8 @@ load_runtime_env() {
|
||||
: "${WIKI_DIR:=$COURSEWARE_STATE_DIR/repos/LLM-Labs}"
|
||||
: "${WIKI_RUNTIME_CONFIG_PATH:=$WIKI_DIR/public/courseware-runtime.json}"
|
||||
: "${COURSEWARE_OLLAMA_BASE_URL:=http://$COURSEWARE_URL_HOST:$COURSEWARE_OLLAMA_PORT}"
|
||||
: "${COURSEWARE_LAB1_QWEN_MODEL_PATH:=$COURSEWARE_STATE_DIR/models/lab1/Qwen3-0.6B-Q8_0.gguf}"
|
||||
: "${COURSEWARE_LAB1_LLAMA_MODEL_PATH:=$COURSEWARE_STATE_DIR/models/lab1/Llama-3.2-1B.Q4_K_M.gguf}"
|
||||
: "${COURSEWARE_LAB1_OLLAMA_MODEL_ALIAS:=lab1-qwen3-0.6b-q8_0}"
|
||||
: "${COURSEWARE_LAB1_OLLAMA_MODEL_ALIAS:=batiai/gemma4-e2b:q4}"
|
||||
: "${LLAMA_CPP_BIN_DIR:=$COURSEWARE_STATE_DIR/repos/llama.cpp/build/bin}"
|
||||
|
||||
if [ -n "${OLLAMA_BIN:-}" ] && [[ "$OLLAMA_BIN" != */* ]] && command -v "$OLLAMA_BIN" >/dev/null 2>&1; then
|
||||
@@ -149,11 +148,10 @@ service_command() {
|
||||
"$COURSEWARE_PROMPTFOO_PORT"
|
||||
;;
|
||||
wiki)
|
||||
printf 'cd "%s" && PATH="%s:$PATH" exec env COURSEWARE_OLLAMA_BASE_URL="%s" COURSEWARE_LAB1_QWEN_MODEL_PATH="%s" COURSEWARE_LAB1_LLAMA_MODEL_PATH="%s" COURSEWARE_LAB1_OLLAMA_MODEL_ALIAS="%s" "./node_modules/.bin/next" start --hostname %s --port %s' \
|
||||
printf 'cd "%s" && PATH="%s:$PATH" exec env COURSEWARE_OLLAMA_BASE_URL="%s" COURSEWARE_LAB1_LLAMA_MODEL_PATH="%s" COURSEWARE_LAB1_OLLAMA_MODEL_ALIAS="%s" "./node_modules/.bin/next" start --hostname %s --port %s' \
|
||||
"$WIKI_DIR" \
|
||||
"$NODE_RUNTIME_BIN_DIR" \
|
||||
"$COURSEWARE_OLLAMA_BASE_URL" \
|
||||
"$COURSEWARE_LAB1_QWEN_MODEL_PATH" \
|
||||
"$COURSEWARE_LAB1_LLAMA_MODEL_PATH" \
|
||||
"$COURSEWARE_LAB1_OLLAMA_MODEL_ALIAS" \
|
||||
"$COURSEWARE_BIND_HOST" \
|
||||
|
||||
@@ -367,14 +367,6 @@ EOF
|
||||
}
|
||||
|
||||
open_kiln() {
|
||||
local host_os
|
||||
|
||||
host_os=$(uname -s)
|
||||
if [ "$host_os" = "Darwin" ] && [ -d "$KILN_MAC_APP" ]; then
|
||||
open "$KILN_MAC_APP"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [ -x "$KILN_LINUX_BIN" ]; then
|
||||
nohup "$KILN_LINUX_BIN" >/dev/null 2>&1 &
|
||||
echo "started Kiln from $KILN_LINUX_BIN"
|
||||
|
||||
Reference in New Issue
Block a user