Makefile and config
Make targets, Python packaging, requirements and the environment template.
.env.example Env · 18 lines
# Copy to .env and fill in. .env is git-ignored — never commit keys.
# Which server scripts use when you don't pass --target (mock|ollama|llamacpp|mlx|fireworks|spark)TARGET=mock
# --- Fireworks (lessons 01, 06b, 07, 08, 10, 13) ---FIREWORKS_API_KEY=fw_xxxxxxxxxxxxxxxxFIREWORKS_ACCOUNT_ID=your-account-id# Look up current ids at https://app.fireworks.ai/modelsFIREWORKS_MODEL=accounts/fireworks/models/gpt-oss-120b
# --- local servers ---OLLAMA_MODEL=llama3.1:8bMLX_MODEL=mlx-community/Meta-Llama-3.1-8B-Instruct-4bit
# --- DGX Spark (lesson 14) ---SPARK_IP=your-spark-hostSPARK_MODEL=nvidia/Llama-3.1-8B-Instruct-FP8.gitignore Text · 24 lines
.env.venv/__pycache__/*.egg-info/results/*!results/.gitkeep
adapters/lessons/11-lora-local-mlx/fused/*.safetensors*.gguf.DS_Storelessons/04-quantization/models/lessons/04-quantization/bench/lessons/05-kv-cache/logs/lessons/06-prefix-caching/preamble.txtlessons/08-batch-api/*.jsonllessons/10-lora-fireworks/.statelessons/11-lora-local-mlx/adapters/lessons/17-full-vs-peft-mlx/logs/lessons/17-full-vs-peft-mlx/adapters/lessons/18-preference-dpo/data/lessons/18-preference-dpo/adapters/lessons/18-preference-dpo/.stateLICENSE Text · 21 lines
MIT License
Copyright (c) 2026 Maruthi Prithivirajan
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.Makefile Makefile · 19 lines
# Shortcuts. `make help` lists them..PHONY: help setup mock check data smoke clean-results fw-check
help: ## list targets @grep -E '^[a-z-]+:.*##' Makefile | awk -F':.*## ' '{printf " make %-14s %s\n", $$1, $$2}'setup: ## Mac: install ollama, llama.cpp, venv, felab (lesson 00) bash lessons/00-setup/setup_mac.shmock: ## run the offline mock LLM server on :9000 python -m felab.mock_servercheck: ## chip, RAM, bandwidth, which servers are up python lessons/00-setup/check_env.pydata: ## build data/tickets/*.jsonl python data/make_tickets.pysmoke: ## run every offline lesson against the mock (~2 min) bash scripts/smoke_test.shfw-check: ## is anything on Fireworks still billing? bash lessons/00-setup/fireworks_guardrails.shclean-results: ## wipe results/ (your measurements!) rm -f results/*.csv results/*.png results/*.mdpyproject.toml TOML · 13 lines
[project]name = "felab"version = "1.0.0"description = "Follow-along labs for the AI Field Engineer / AI engineering"requires-python = ">=3.10"dependencies = ["openai>=1.40", "jsonschema>=4"]
[project.optional-dependencies]plot = ["matplotlib>=3.8"]mac = ["mlx-lm>=0.20"] # Apple silicon only
[tool.setuptools]packages = ["felab"]requirements.txt Text · 7 lines
# core — every lessonopenai>=1.40jsonschema>=4# charts (lessons 03, 04) — optional, scripts fall back to text tablesmatplotlib>=3.8# Apple silicon only (lessons 02, 06, 11) — comment out on Linuxmlx-lm>=0.20