- Posted on
- • Artificial Intelligence
Artificial Intelligence Study Checklist
- Author
-
-
- User
- linuxbash
- Posts by this author
- Posts by this author
-
The Linux Bash-Friendly Artificial Intelligence Study Checklist
If AI feels overwhelming, your terminal can be your compass. Between math, models, data, and tools, it’s easy to get stuck before you start. This checklist gives you a practical, Linux-first path to begin (and keep) studying artificial intelligence—using the shell to build a clean, reproducible workflow you can trust.
Why this matters:
Reproducibility beats guesswork. A consistent environment makes your learning and results reliable.
Command-line skills scale. The same skills you use today for small experiments will carry you into bigger projects tomorrow.
Minimalism wins. A tight, well-understood stack is more valuable than a chaotic pile of tools.
Below is a concise, actionable plan with real commands and examples.
1) Prepare your Linux AI Toolchain (10–15 minutes)
Install the essentials: compilers, Python, headers for building packages, Git, plus handy shell tools. These keep Python packages happy (numpy, scikit-learn) and set you up for long-running sessions and quick data inspection.
- What you’re getting:
- Build tools and headers (for pip builds)
- Python + pip + venv
- Git + Git LFS (for tracking model artifacts)
- Jupyter runtime dependencies (handled via pip)
- Utilities: curl, wget, jq, tmux, and an editor (neovim)
Use the package manager for your distro.
Ubuntu/Debian (apt):
sudo apt update
sudo apt install -y \
build-essential pkg-config \
python3 python3-pip python3-venv python3-dev \
libssl-dev libffi-dev libopenblas-dev \
cmake git git-lfs curl wget jq tmux neovim
Fedora/RHEL/CentOS Stream (dnf):
sudo dnf -y install \
gcc gcc-c++ make pkgconf-pkg-config \
python3 python3-pip python3-venv python3-devel \
openssl-devel libffi-devel openblas-devel \
cmake git git-lfs curl wget jq tmux neovim
openSUSE Leap/Tumbleweed (zypper):
sudo zypper refresh
sudo zypper install -y \
gcc gcc-c++ make pkg-config \
python3 python3-pip python3-devel \
libopenssl-devel libffi-devel openblas-devel \
cmake git git-lfs curl wget jq tmux neovim python3-virtualenv
Tip: If python3 -m venv fails on your distro, use virtualenv (we install it below via pip) as a fallback.
2) Create a Clean Python Workspace (and keep it clean)
A per-project virtual environment isolates your dependencies and avoids conflicts.
Create and activate a venv:
mkdir -p ~/ai-playground && cd ~/ai-playground
python3 -m venv .venv || python3 -m virtualenv .venv
source .venv/bin/activate
Upgrade packaging tools and install the core stack:
python -m pip install --upgrade pip setuptools wheel
python -m pip install numpy pandas scikit-learn jupyterlab matplotlib seaborn joblib ipykernel
Add the venv to Jupyter (so you can choose it as a kernel):
python -m ipykernel install --user --name ai-venv --display-name "AI venv"
Optional: quick activation alias in your shell
echo 'alias act="source .venv/bin/activate"' >> ~/.bashrc
source ~/.bashrc
Launch Jupyter when you need notebooks:
jupyter lab
Why this matters:
venvs prevent “it worked yesterday” issues.
Jupyter is ideal for exploratory learning and visuals while you still have a scripted path for repeatable runs.
3) Run a Real Experiment from the Terminal (end-to-end)
You’ll train a tiny model, save it, and print accuracy—entirely from the CLI. This cements the flow you’ll reuse for bigger projects.
Create train.py:
cat > train.py << 'PY'
#!/usr/bin/env python3
import os
import joblib
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import accuracy_score
def main():
data = load_iris()
X, y = data.data, data.target
X_train, X_test, y_train, y_test = train_test_split(
X, y, test_size=0.25, random_state=42, stratify=y
)
clf = LogisticRegression(max_iter=1000, n_jobs=1)
clf.fit(X_train, y_train)
preds = clf.predict(X_test)
acc = accuracy_score(y_test, preds)
os.makedirs("models", exist_ok=True)
model_path = "models/iris_logreg.joblib"
joblib.dump(clf, model_path)
print(f"Saved model to {model_path}")
print(f"Test accuracy: {acc:.4f}")
if __name__ == "__main__":
main()
PY
chmod +x train.py
Run it:
source .venv/bin/activate
python train.py
Example output:
Saved model to models/iris_logreg.joblib
Test accuracy: 0.9737
Inspect the saved file:
ls -lh models/
Why this matters:
You just completed data → train → evaluate → save in one shot.
This mirrors production loops, even though it’s a toy dataset.
4) Track Experiments and Make Them Reproducible
Version control and simple automation keep your learning organized and repeatable.
Initialize Git and Git LFS:
git init
git lfs install
git lfs track "*.joblib"
echo ".venv/" >> .gitignore
echo "__pycache__/" >> .gitignore
echo ".ipynb_checkpoints/" >> .gitignore
git add .
git commit -m "First experiment: iris + logistic regression"
Lock your environment so you can rebuild it later:
python -m pip freeze | tee requirements.lock
git add requirements.lock
git commit -m "Lock Python dependencies"
Optional Makefile for one-command workflows:
cat > Makefile << 'MK'
PYTHON := .venv/bin/python
.PHONY: venv install train clean
venv:
python3 -m venv .venv || python3 -m virtualenv .venv
. .venv/bin/activate && python -m pip install -U pip setuptools wheel
install:
. .venv/bin/activate && python -m pip install -r requirements.lock || \
(. .venv/bin/activate && python -m pip install numpy pandas scikit-learn jupyterlab matplotlib seaborn joblib ipykernel)
train:
$(PYTHON) train.py
clean:
rm -rf __pycache__ .ipynb_checkpoints
MK
Run:
make venv
make install
make train
Why this matters:
Git captures code, configs, and models (via LFS).
The Makefile makes your steps obvious and shareable.
5) Learn Efficiently with the Shell
Small Bash habits compound into big time-savers:
Keep long runs alive with tmux:
tmux new -s ai # Do your work... # Detach with Ctrl-b then d tmux attach -t aiTime your scripts to spot bottlenecks:
/usr/bin/time -v python train.pyInspect JSON quickly (APIs, experiment logs):
echo '{"metric": 0.97, "model": "logreg"}' | jq .
Why this matters:
- You’ll prototype faster and debug smarter using the shell as your control center.
Common Fixes (If You Hit Snags)
If
python3 -m venvfails on your distro:python3 -m pip install --user virtualenv python3 -m virtualenv .venv source .venv/bin/activateIf numpy/scikit-learn builds are slow or fail:
- Ensure BLAS and compilers are installed (see apt/dnf/zypper commands above).
- Upgrade pip/setuptools/wheel before installing:
python -m pip install --upgrade pip setuptools wheel
Conclusion: Your Next Step
You now have:
A Linux-native AI toolbox
A clean Python environment
A reproducible training run
Version control with Git and LFS
Shell patterns that scale
Next steps:
1) Extend the example: swap LogisticRegression for RandomForest or SVC and compare results.
2) Move to a real dataset: try a Kaggle CSV and adapt train.py to load from disk.
3) Capture results in a simple CSV or JSON so you can plot learning curves in Jupyter.
Most importantly, keep the loop tight: edit → run → commit → note results. Your terminal is a powerful lab—use it to make steady, confident progress in AI.