Posted on
Artificial Intelligence

Artificial Intelligence Career Projects

Author
  • User
    linuxbash
    Posts by this author
    Posts by this author

Artificial Intelligence Career Projects You Can Build From Your Linux Terminal

If you want AI roles, “show me your projects” beats “show me your certificates.” The quickest way to prove you can ship is to automate, reproduce, and explain an AI workflow—and Linux Bash is perfect for that. In this guide, you’ll build a small but solid portfolio of AI projects using Python and Bash, with reproducibility baked in. You’ll finish with artifacts you can show in interviews: code, metrics, and automation.

Why this matters:

  • Hiring teams value end-to-end ability: data prep, training, evaluation, automation.

  • Most AI runs on Linux; being fluent in Bash + Python is immediately useful.

  • Reproducibility (Makefiles, scripts) demonstrates professionalism and MLOps awareness.


Prerequisites: Set Up Your Toolbox

Install core tools. Use the command set for your distro.

Debian/Ubuntu (apt):

sudo apt update
sudo apt install -y python3 python3-venv python3-pip git make gcc g++ jq

Fedora/RHEL/CentOS (dnf):

sudo dnf install -y python3 python3-pip git make gcc gcc-c++ jq

openSUSE (zypper):

sudo zypper refresh
sudo zypper install -y python3 python3-pip git make gcc gcc-c++ jq

Create a workspace:

mkdir -p ~/ai-portfolio/{scripts,models,reports,logs}
cd ~/ai-portfolio
python3 -m venv .venv
source .venv/bin/activate
pip install -U pip

Add base Python dependencies:

cat > requirements.txt <<'EOF'
numpy
pandas
scikit-learn
joblib
EOF

pip install -r requirements.txt

Project 1: Baseline Model With a One-Command Bash Runner

Goal: Train and evaluate a simple classifier, save the model and metrics, and ensure anyone can reproduce it.

Skeleton:

# scripts/train.sh
#!/usr/bin/env bash
set -euo pipefail

python3 -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install -r requirements.txt

python train.py

deactivate
chmod +x scripts/train.sh

Training script (uses scikit-learn’s Wine dataset to avoid external data hassles):

# train.py
import os, json, time, pathlib
import numpy as np
from sklearn.datasets import load_wine
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import accuracy_score, classification_report
import joblib

SEED = int(os.getenv("SEED", "42"))
np.random.seed(SEED)

out_models = pathlib.Path("models"); out_models.mkdir(exist_ok=True, parents=True)
out_reports = pathlib.Path("reports"); out_reports.mkdir(exist_ok=True, parents=True)

X, y = load_wine(return_X_y=True, as_frame=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.25, random_state=SEED, stratify=y)

clf = RandomForestClassifier(n_estimators=200, random_state=SEED, n_jobs=-1)
t0 = time.time()
clf.fit(X_train, y_train)
train_time = time.time() - t0

y_pred = clf.predict(X_test)
acc = accuracy_score(y_test, y_pred)
report = classification_report(y_test, y_pred, output_dict=True)

artifacts = {
    "seed": SEED,
    "n_estimators": 200,
    "accuracy": acc,
    "train_time_sec": round(train_time, 3),
    "classes": list(np.unique(y)),
    "report": report,
}

with open(out_reports / "metrics.json", "w") as f:
    json.dump(artifacts, f, indent=2)

joblib.dump(clf, out_models / "wine_rf.joblib")
print(f"Saved model to {out_models/'wine_rf.joblib'} and metrics to {out_reports/'metrics.json'}")

# Optional MLflow logging (set USE_MLFLOW=1)
if os.getenv("USE_MLFLOW"):
    try:
        import mlflow
        with mlflow.start_run():
            mlflow.log_param("seed", SEED)
            mlflow.log_param("n_estimators", 200)
            mlflow.log_metric("accuracy", acc)
            mlflow.log_metric("train_time_sec", train_time)
            mlflow.sklearn.log_model(clf, "model")
            mlflow.log_artifact(out_reports / "metrics.json")
            print("Logged run to MLflow.")
    except Exception as e:
        print(f"MLflow logging skipped: {e}")

Run it:

bash scripts/train.sh

View metrics:

cat reports/metrics.json | jq

What you’re demonstrating:

  • Reproducible training

  • Clear artifacts (model + metrics)

  • Seed control for deterministic experiments


Project 2: Reproducibility With a Makefile

Turn actions into targets so reviewers can run everything with make.

# Makefile
.PHONY: all venv train metrics clean

venv:
    python3 -m venv .venv
    . .venv/bin/activate && pip install -U pip && pip install -r requirements.txt

train: venv
    . .venv/bin/activate && python train.py

metrics:
    cat reports/metrics.json | jq

all: train metrics

clean:
    rm -rf .venv models reports logs mlruns mlruns.db

Usage:

make all

What you’re demonstrating:

  • Build automation familiar to engineers across disciplines

  • One-command reproducibility


Project 3: Add Experiment Tracking With MLflow

Track parameters, metrics, and models. Great for interviews—open a local web UI and walk through your experiments.

Install MLflow (inside your venv):

source .venv/bin/activate
pip install mlflow

Run a tracked experiment:

USE_MLFLOW=1 python train.py

Start the UI:

mlflow ui

Open http://127.0.0.1:5000 and explore runs, metrics, and artifacts.

What you’re demonstrating:

  • Experiment management literacy

  • Ability to compare runs and capture artifacts

Tip: Commit the mlruns directory to .gitignore but show screenshots in your README.


Project 4: Simple CLI Inference for Real-World Usability

Create a small CLI that reads a CSV with feature columns and prints predictions using your saved model.

# predict.py
import sys, argparse, joblib, pandas as pd

def main():
    ap = argparse.ArgumentParser(description="Predict classes for Wine dataset rows (CSV).")
    ap.add_argument("--model", default="models/wine_rf.joblib")
    ap.add_argument("--csv", required=True, help="Path to CSV with Wine features (headers must match sklearn load_wine feature names).")
    args = ap.parse_args()

    clf = joblib.load(args.model)
    X = pd.read_csv(args.csv)
    preds = clf.predict(X)
    for i, p in enumerate(preds):
        print(f"row={i} prediction={p}")

if __name__ == "__main__":
    main()

Generate a sample CSV and run prediction:

# Create one sample row with correct headers
python - <<'PY'
from sklearn.datasets import load_wine
import pandas as pd
X, y = load_wine(return_X_y=True, as_frame=True)
X.iloc[[0]].to_csv("sample.csv", index=False)
print("Wrote sample.csv")
PY

source .venv/bin/activate
python predict.py --csv sample.csv

What you’re demonstrating:

  • Practical deployment-oriented thinking (batch inference)

  • Clear interfaces (arguments, I/O contracts)


Real-World Mapping

  • Data Scientist: Baseline modeling, metrics, clear documentation.

  • Machine Learning Engineer: Pipelines, Makefiles, CLI interfaces.

  • MLOps/Platform: Experiment tracking, environment isolation, automation.

Optional: Schedule nightly runs to test stability and drift signals.

# Edit your user crontab
crontab -e

# Run every weekday at 03:00, logging output
0 3 * * 1-5 cd /home/$USER/ai-portfolio && /usr/bin/bash -lc 'source .venv/bin/activate && SEED=$(date +%s) python train.py >> logs/cron.log 2>&1'

How to Present This in Your Portfolio

  • Include a concise README with:

    • What the project does (one paragraph)
    • How to run (two commands max: make all, python predict.py ...)
    • Example outputs (paste metrics.json and sample predictions)
  • Commit:

    • scripts/train.sh, Makefile, train.py, predict.py, requirements.txt
    • reports/metrics.json (example), models/ (optional; or provide a release asset)
  • Add a short “Design notes” section:

    • Reproducibility choices (venv, seeds)
    • Tracking (MLflow)
    • Limitations and next steps (feature engineering, hyperparameter search)

Conclusion / Call To Action

Stop scrolling and ship your first artifact:

  • Copy the snippets into ~/ai-portfolio.

  • Run make all to produce metrics and a model.

  • Add MLflow and a prediction demo.

  • Push to GitHub with a clean README.

Your next step: extend one project (hyperparameter tuning, data validation, or a small FastAPI inference service). Every commit is a story you can tell in your next interview—starting today from your Bash prompt.