mantus.ai

FIVE MINUTES TODAY, A SMARTER TOMORROW

How do you set up your first AI development workspace?

Configure VS Code or Jupyter for AI work, organize your project structure, and set up version control. Create a workspace that scales as your projects grow.

You have Python, GPU drivers, and the core AI tools installed. Now you need a workspace that will grow with you. A good workspace means you can find your code, track changes, and jump between projects without losing your mind.

Pick your editor first

You need a code editor that understands Python and plays well with AI libraries. Two choices matter: VS Code and Jupyter.

VS Code works like a traditional editor with files, folders, and extensions. Install it from the Ubuntu Software store or run snap install code --classic. Once installed, add the Python extension from Microsoft. It handles syntax highlighting, debugging, and virtual environments automatically.

Jupyter runs in your browser and works with notebooks. Better for experimentation and data analysis. Install with pip install jupyter then start it with jupyter notebook. Your browser opens to a file manager where you can create notebooks.

Pick VS Code if you write complete programs. Pick Jupyter if you experiment with data and models. You can use both, but start with one to avoid decision paralysis.

Create a project structure that scales

Your home directory will become chaos if you dump everything there. Create a structure now that handles multiple projects and different types of work.

Make a dev folder in your home directory: mkdir ~/dev. Inside that, create folders for different project types: mkdir ~/dev/ai-projects ~/dev/experiments ~/dev/tutorials.

For each AI project, use this structure:

project-name/
├── data/
├── notebooks/
├── src/
├── models/
├── requirements.txt
└── README.md

The data folder holds datasets. notebooks for Jupyter experiments. src for Python modules you build. models for saved weights and checkpoints. Keep this consistent across projects and you will thank yourself later.

Set up version control

Git tracks changes to your code. Essential for any project longer than a weekend. Ubuntu includes git, but configure it first:

git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"

For each project, run git init in the project root. Create a .gitignore file that excludes large files and temporary directories:

__pycache__/
*.pyc
.jupyter_checkpoints/
data/
models/*.pkl
models/*.h5
.env

This keeps your repository clean. Data files and trained models are too large for git. Store them separately and document where they live in your README.

Manage Python environments properly

Different projects need different package versions. Virtual environments solve this. Create one environment per project, not one giant environment for everything.

Navigate to your project folder and create an environment:

cd ~/dev/ai-projects/my-first-project
python -m venv venv
source venv/bin/activate

Your terminal prompt changes to show the active environment. Install packages with pip and save the list: pip freeze > requirements.txt. Anyone can recreate your environment with pip install -r requirements.txt.

Deactivate with deactivate when you switch projects. Activate with source venv/bin/activate when you return. VS Code detects virtual environments automatically if you open the project folder.

Configure your GPU workspace

Your GPU setup from the previous step works system wide, but check it works in your development environment. Create a test notebook or Python script:

import torch
print(f"CUDA available: {torch.cuda.is_available()}")
print(f"GPU device: {torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'None'}")

If this fails, your virtual environment might miss CUDA enabled PyTorch. Install it explicitly: pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

Build a project template

Create one complete project structure as a template. When you start new work, copy this template instead of building from scratch.

mkdir ~/dev/project-template
cd ~/dev/project-template
mkdir data notebooks src models
touch requirements.txt README.md .gitignore
echo "# Project Template" > README.md

Copy the gitignore contents from above. Add basic requirements like numpy, pandas, and matplotlib to requirements.txt. Now cp -r ~/dev/project-template ~/dev/ai-projects/new-project-name gives you a ready workspace.

Your development environment is ready. You can write code, experiment with models, and track changes. The structure scales from quick experiments to serious projects. Next, you will learn what to do when things break.