To ensure a smooth onboarding experience with femtoAI tools and SDKs, developers should be familiar with the basics of Python environments and package management. This guide provides a brief overview of the concepts and tools required.
1. Common CLI Commands
Distributors should be comfortable navigating the terminal or command line interface (CLI), as many SDK tools are CLI-based.
Basics
- Navigate directories:
cd /path/to/directory
- List files:
ls # Unix/macOS
dir # Windows
- Check current directory:
pwd # Unix/macOS
- Make a new directory:
mkdir new-folder
- Run a Python script:
python script.py
Helpful Tips
- Use the
--helpflag to see options for most commands:
python script.py --help
π Learn more: Linux Command Line Basics (by freeCodeCamp)
1b. macOS: Homebrew and wget
Some femtoAI setup scripts use wget to download datasets and files. On macOS, wget is not installed by default. You’ll need to install Homebrew (a macOS package manager) first, then use it to install wget.
Install Homebrew
Download and run the installer from brew.sh
Follow the on-screen instructions. After installation, verify it:
brew --version
Install wget
brew install wget
Verify:
wget --version
Note: This step is macOS-only. Linux distributions typically include
wgetby default. Windows users can usecurlor the Windows Subsystem for Linux (WSL).
π Learn more: Homebrew Documentation
2. Python Environments
Python environments help isolate project dependencies to avoid conflicts between different tools and libraries. At femtoAI, we recommend using conda for environment management.
Installing Conda
Before creating a conda environment, you need to have conda installed. We recommend Miniconda β a lightweight installer that includes only conda and Python.
macOS / Linux:
Download the installer for your platform from the Miniconda downloads page, then run it from your terminal. For example:
bash ~/Downloads/Miniconda3-latest-MacOSX-x86_64.sh
Follow the prompts, then restart your terminal or run:
source ~/.bashrc # Linux
source ~/.zshrc # macOS (zsh)
Windows:
Download and run the Miniconda installer from the official site: https://docs.conda.io/en/latest/miniconda.html
Verify the installation:
conda --version
π Learn more: Miniconda Installation Guide
Using Conda
- Create a new environment:
conda create -n femto-env python=3.10
- Activate the environment:
conda activate femto-env
- Install packages inside the environment:
pip install -r requirements.txt
- Deactivate when done:
conda deactivate
Best Practices
- Create a new conda environment for each project or version of the SDK.
- Always activate your environment before running scripts or installing packages.
π Learn more: Conda User Guide
2b. Understanding Folder Structure for Conda Environments
When using Conda (or Anaconda), environments and packages are typically stored in predefined directories. Understanding where these are located can help you keep your setup organized.
Default Folder Locations
- Anaconda Installation Folder: This is where the base Anaconda system is installed. Example:
- Windows:
C:/Users/YourName/Anaconda3 - macOS/Linux:
/Users/YourName/anaconda3or/home/username/anaconda3
- Windows:
- Environments Folder:
- By default, new environments are stored inside
envs/within the Anaconda folder:- Example:
C:/Users/YourName/Anaconda3/envs/femto-env
- Example:
- By default, new environments are stored inside
- Your Project Folder: This is where your actual project files (scripts, SDK, model files, etc.) live. This can be anywhere you choose, like:
C:/Users/YourName/Documents/femtoAI_project/home/username/projects/femtoAI_project
Folder Tree Example
C:/Users/YourName/
βββ Anaconda3/
β βββ envs/
β β βββ femto-env/
β βββ pkgs/
βββ Documents/
β βββ femtoAI_project/
β βββ script.py
β βββ requirements.txt
Tips
- You do not need to move your project files into the Anaconda folder.
- Just activate the correct Conda environment in your terminal before working in your project folder:
conda activate femto-env
cd ~/Documents/femtoAI_project
π Learn more: Managing Environments in Conda
3. Python Package Management
Python uses package managers to install and manage libraries or tools (known as packages). At femtoAI, you’ll be working with Python packages for interacting with our SDK, tooling, and possibly for running inference workflows.
Key Concepts
- pip: The standard Python package installer. Example:
pip install femtocrux
- requirements.txt: A file listing required packages and versions.
To install all dependencies for a project,cdinto the project directory with arequirements.txtthen run the following command:
pip install -r requirements.txt
- PyPI: The Python Package Index, the default source for pip packages.
- Editable installs: Used for development. If working with a cloned repo:
pip install -e .
Tips
- Always ensure pip is up to date:
pip install --upgrade pip
- Use version pinning (
==) in requirements to ensure compatibility.
π Learn more: pip Documentation
4. Docker
femtoAI’s compilation toolchain (Femtodriver) runs inside a Docker container. Docker must be installed before you reach the compilation step in any end-to-end example β if it is missing, you will be blocked mid-workflow after completing setup.
Install Docker Desktop
Download Docker Desktop for your operating system from the official site:
https://www.docker.com/products/docker-desktop/
Follow the installer instructions, then verify Docker is running:
docker --version
docker run hello-world
If hello-world prints a success message, Docker is working correctly.
Summary
Before using femtoAI tools, ensure you have the following installed and configured:
- conda (via Miniconda) β for creating and managing Python environments
- pip β for installing Python packages
- wget β for downloading datasets (macOS: install via Homebrew)
- Docker β required for the femtoAI compilation step via Femtodriver
- Familiarity with common command line tasks
This foundation ensures that developers can successfully run examples, use the SDK, and integrate femtoAI capabilities into their workflows.
For a complete install walkthrough including how the Docker image is pulled automatically, see the femtocrux Installation Guide.
Need help? Contact your femtoAI technical point of contact or tech-support@femto.ai