Role: Facilitates seamless communication and transfer of information between different crews and their respective agents.
Functionality: Receives notes, codes, and text from one crew’s agents and efficiently delivers them to the appropriate agents in other crews.
Responsibilities:
Ensuring timely and accurate transmission of information.
Maintaining confidentiality and integrity of transferred data.
Facilitating collaboration and coordination among crews.
Research Crew
Focus: Gather in-depth knowledge and insights about the operating system. Identify key features, advancements, user needs, and common challenges.
Agents:
Deep Researcher: Conducts thorough research into technical specifications, history, and ecosystem of the operating system.
Subject Matter Expert (SME): Provides authoritative insights into specific areas of the operating system, based on the tutorial’s focus.
Data Analyst: Analyzes trends, user data, and feedback to guide the tutorial’s scope and focus areas.
Librarian/Information Specialist: Sources and organizes high-quality resources, academic papers, and documentation for reference.
Design Crew
Focus: Design the tutorial’s structure, ensuring it’s engaging, educational, and accessible to the target audience.
Agents:
CPO (Chief Product Officer): Ensures the tutorial aligns with user needs and product goals.
CTO (Chief Technology Officer): Provides technical oversight, ensuring the tutorial’s content is accurate and feasible.
Designer: Focuses on the tutorial’s visual and UX aspects, including diagrams, interface designs, and multimedia elements.
CEO: Reviews the design for strategic alignment with company vision and market positioning.
Coding Crew
Focus: Develop code examples, demos, or scripts that illustrate the operating system’s functionalities and features.
Agents:
Programmer: Implements and tests the code examples, ensuring they are clear, functional, and well-commented.
CTO: Reviews code for technical accuracy, best practices, and security considerations.
Designer: Works on any UI/UX aspects related to the code examples or demos, ensuring they are user-friendly and visually appealing.
Testing Crew
Focus: Thoroughly test the code examples, demos, and any associated applications to ensure they work as expected across different environments.
Agents:
Tester: Executes test plans, reports issues, and verifies bug fixes for the code examples and demos.
Programmer: Addresses any bugs or issues found during testing, refining the code as needed.
Reviewer: Conducts code reviews for quality assurance, focusing on maintainability, performance, and adherence to standards.
Documentation Crew
Focus: Create the final tutorial content, integrating research findings, design principles, code examples, and testing insights.
Agents:
CTO: Ensures technical accuracy and completeness of the tutorial content.
Programmer: Provides detailed explanations and insights for code examples and technical processes.
CEO: Reviews the final content for alignment with overarching goals, user engagement, and educational value.
CPO: Ensures the tutorial meets user needs, is accessible, and aligns with product objectives.
Building the Project
Research Phase: Start with the Research Crew to establish a solid foundation of knowledge. This step sets the direction and scope of the tutorial.
Design Phase: With insights from research, move to the Design Crew to structure the tutorial, plan content segments, and design interactive elements.
Message Relay Agent: Introduce the Message Relay Agent to facilitate seamless communication and transfer of information between crews. This ensures efficient collaboration and coordination throughout the project.
Coding Phase: Develop and refine code examples or demos with the Coding Crew, ensuring they illustrate key concepts effectively.
Testing Phase: Have the Testing Crew thoroughly test all code elements to ensure accuracy and reliability.
Documentation Phase: Compile and refine the tutorial content with the Documentation Crew, integrating all elements into a cohesive, engaging educational resource.
1 - Jetson Nano Setup Guide
A comprehensive guide to setting up your Jetson Nano.
Introduction
Welcome to the Jetson Nano Setup Guide! This guide will walk you through the process of setting up your Jetson Nano developer kit, from downloading the system image to configuring advanced usage scenarios.
Download Jetson Nano Image
Before you begin, you’ll need to download the system image for your Jetson Nano model:
Place the MicroSD back into the jetson nano and start.
Fresh Install Setup Guide for Jetson Nano
Once your Jetson Nano board is up and running with Ubuntu Desktop, let’s kickstart the setup process by opening the terminal and following these steps:
Step 1: Update System
First, let’s ensure your system is up to date:
sudo apt update
Next, upgrade your Jetson Nano:
sudo apt upgrade -y
During the upgrade process, you may encounter prompts for configuration files.
Select Y to install the package maintainer’s version.
Configuration file '/etc/ld.so.conf.d/nvidia-tegra.conf'==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** nvidia-tegra.conf (Y/I/N/O/D/Z)[default=N] ? Y
Again select Y to install the package maintainer’s version.
Configuration file '/etc/systemd/nv-oem-config-post.sh'==> Deleted (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** nv-oem-config-post.sh (Y/I/N/O/D/Z)[default=N] ? Y
Additionally, if prompted to restart Docker, select YES.
Now, let’s perform a distribution upgrade:
sudo apt dist-upgrade -y
Step 2: Clean Up
Once the upgrade process is complete, let’s tidy up by removing old packages:
sudo apt autoremove -y
And finally, let’s clean up the cache:
sudo apt clean
Step 3: Reboot
After these maintenance tasks, it’s recommended to reboot your Jetson Nano for changes to take effect:
sudo reboot now
Install Useful Tools
Here are some essential tools that are handy for almost every project:
sudo apt install git nano curl wget -y
Uninstall LibreOffice
If you no longer need LibreOffice and want to reclaim some disk space, follow these steps to remove it:
sudo apt autoremove libreoffice* -y
This command will uninstall all LibreOffice packages from your system.
After removing LibreOffice, let’s clean up the residual files:
sudo apt clean
This command will clean the package cache, freeing up additional disk space.
Your system is now free of LibreOffice and optimized for your needs.
Installing pip and pip3
To install both pip and pip3, which are package managers for Python 2 and Python 3 respectively, run the following command:
sudo apt install python-pip python3-pip -y
This command will install pip for Python 2 and pip3 for Python 3 on your system.
You’re all set with pip and pip3 installed and ready to manage Python packages!
Installing Jetson Stats
To install Jetson Stats, a utility for monitoring and controlling NVIDIA Jetson devices, follow these steps:
Warning
Before proceeding, ensure that you have pip3 installed on your system. If not, you can install it using sudo apt install python3-pip.
sudo pip3 install -U jetson-stats
This command will install Jetson Stats and ensure that you have the latest version.
After installation, reboot your Jetson Nano to enable the jtop command:
sudo reboot now
Once your device has rebooted, reopen the terminal and type the following command to launch Jetson Stats:
jtop
This will open the Jetson Stats interface, allowing you to monitor various aspects of your Jetson Nano’s performance.
You’re now ready to utilize Jetson Stats for optimizing your Jetson Nano’s performance!
Configuring Jetson Fan to Start at Boot
To ensure your Jetson Nano’s fans start automatically at boot, follow these steps:
Open and edit the rc.local file using the Nano text editor:
This will ensure sufficient memory for the OpenCV installation.
OpenCV Installation Guide
Before installing OpenCV on your Jetson Nano, ensure that your system has sufficient memory by following the steps above to increase swap space if needed.
As a tip to save additional space, you can remove the OpenCV and OpenCV_contrib directories:
sudo rm -rf ~/opencv
sudo rm -rf ~/opencv_contrib
Congratulations! You’ve successfully installed OpenCV on your Jetson Nano.
Install Python 3.12 on Jetson Nano From Source
Python 3.12 brings new features, improvements, and optimizations to the language, making it desirable for developers who want to leverage the latest capabilities.
To install Python 3.12 on your Jetson Nano from source, follow these steps:
Update your system’s package list:
sudo apt update
Install the necessary dependencies for building Python:
After completing the installation, reboot your Jetson Nano:
sudo reboot now
After rebooting, Python 3 will be installed on your Jetson Nano from the source code. You can verify the installation by running python3 --version.
Install CrewAI on Jetson Nano
CrewAI is a powerful AI platform designed to assist with a variety of tasks. To install CrewAI on your Jetson Nano, follow these steps:
To install the main CrewAI package, which includes core functionalities, run the following command:
pip3 install crewai
If you also want to install the tools package, which includes a series of helpful tools for your agents, you can use the following command:
pip3 install 'crewai[tools]'
This command will install the main CrewAI package along with additional tools to enhance your CrewAI experience.
Once installed, you can start using CrewAI to develop and deploy AI solutions on your Jetson Nano.
Make test script for crewAI (Testing)
mkdir test_ai &&cd test_ai
nano .env
and then add this
ANTHROPIC_API_KEY=your_anthropic_api_key
Now save and close nano
now let’s create our main.py
nano main.py
And then add this code below
importosfromdotenvimportload_dotenvfromcrewaiimportAgent,Task,Crewfromlangchain.llmsimportAnthropicfromtextwrapimportdedent# Load the API key from the .env fileload_dotenv()ANTHROPIC_API_KEY=os.getenv("ANTHROPIC_API_KEY")# Define a simple agentclassSimpleAgent:def__init__(self):self.Claude=Anthropic(anthropic_api_key=ANTHROPIC_API_KEY,temperature=0.7)defcreate_agent(self):returnAgent(role="Simple Test Agent",backstory=dedent("""You are a helpful assistant."""),goal=dedent("""Your goal is to assist the user with their query."""),allow_delegation=False,verbose=True,llm=self.Claude,)# Define a simple taskclassSimpleTask:def__init__(self,user_query):self.user_query=user_querydefcreate_task(self,agent):returnTask(description=dedent(f"""
Please assist with the following query:
{self.user_query} """),agent=agent,)# Main functionif__name__=="__main__":print("## Welcome to the Crew AI Test")print("-------------------------------")user_query=input(dedent("""Enter your query: """))simple_agent=SimpleAgent().create_agent()simple_task=SimpleTask(user_query).create_task(simple_agent)crew=Crew(agents=[simple_agent],tasks=[simple_task],verbose=True)result=crew.kickoff()print("\n\n########################")print("## Here is the result:")print("########################\n")print(result)
1.1 - step one
Required Items
Nvidia Jeton Nano
MicroSD card
Nocuafan
Powersupply 5w
Keyboard/mouse
Internet cable
External SSD or M2 harddrive
WiFi
NOTE: This will eb the simpel version as i will make an other guide how to update the iso with new kernel without breaking stuff. It has been a while that Nvidia has been updating there Jetson Nano iso.
Setting up the MicroSD with Ubuntu using balenaEther
# SPDX-FileCopyrightText: Copyright (c) 2019-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.# SPDX-License-Identifier: LicenseRef-NvidiaProprietary## NVIDIA CORPORATION, its affiliates and licensors retain all intellectual# property and proprietary rights in and to this material, related# documentation and any modifications thereto. Any use, reproduction,# disclosure or distribution of this material and related documentation# without an express license agreement from NVIDIA CORPORATION or# its affiliates is strictly prohibited.deb https://repo.download.nvidia.com/jetson/common r32.7 main
deb https://repo.download.nvidia.com/jetson/t210 r32.7 main
Example: Install and configure popular machine learning frameworks like TensorFlow, PyTorch, or MXNet to leverage the Jetson Nano’s GPU for accelerated deep learning tasks.
Guide:
Follow the official documentation or community tutorials for each framework to install the required dependencies and set up GPU support.
Utilize pre-trained models or train custom models using datasets optimized for inference on edge devices.
Explore optimizations such as TensorRT integration for improved inference performance on the Jetson Nano.
2. Dockerized Applications
Example: Containerize applications using Docker to simplify deployment and manage dependencies on the Jetson Nano.
Guide:
Install Docker CE (Community Edition) on the Jetson Nano by following the official Docker documentation.
Create Dockerfiles to define the application environment and dependencies.
Build Docker images for your applications and run them in containers on the Jetson Nano.
Explore Docker Compose for orchestrating multi-container applications or deploying services with dependencies.
3. IoT Integration
Example: Integrate the Jetson Nano into IoT (Internet of Things) projects for edge computing and sensor data processing.
Guide:
Interface sensors or peripherals with the Jetson Nano using GPIO pins, I2C, SPI, or USB interfaces.
Develop applications to collect, process, and transmit sensor data to cloud services or local IoT gateways.
Implement edge AI algorithms for real-time analytics, anomaly detection, or predictive maintenance in IoT deployments.
Explore MQTT (Message Queuing Telemetry Transport) or other IoT protocols for communication between devices and cloud services.
4. Computer Vision Applications
Example: Build computer vision applications using libraries like OpenCV or specialized frameworks for object detection, image recognition, or facial recognition.
Guide:
Install OpenCV and other relevant libraries using package managers or by compiling from source.
Experiment with pre-trained models for tasks like object detection (YOLO, SSD), image classification (ResNet, MobileNet), or semantic segmentation (DeepLab, Mask R-CNN).
Capture and process video streams from cameras or video files for real-time analysis or surveillance applications.
Explore techniques for optimizing computer vision algorithms for performance on resource-constrained devices like the Jetson Nano.
5. Robotics Projects
Example: Use the Jetson Nano as the brain of robotic systems for tasks such as autonomous navigation, object manipulation, or drone control.
Guide:
Interface sensors, actuators, and motor controllers with the Jetson Nano to enable sensing and control capabilities.
Develop control algorithms using frameworks like ROS (Robot Operating System) or libraries like Jetson.GPIO for GPIO control.
Implement perception algorithms for environment mapping, obstacle detection, or localization using onboard sensors or external cameras.
Integrate AI models for tasks like object detection, gesture recognition, or path planning to enable autonomous behavior in robotic systems.
These advanced usage examples demonstrate the versatility of the Jetson Nano for a wide range of applications beyond basic system setup and configuration.
Troubleshooting
1. Network Connectivity Issues
Problem: Unable to connect to the internet or download packages during setup.
Solution:
Check the network connection by running ping google.com. If there is no response, ensure that the Jetson Nano is properly connected to the network and that the router or modem is functioning correctly.
Verify network settings, including IP configuration and DNS servers, by running ifconfig and cat /etc/resolv.conf.
If using Wi-Fi, ensure that the correct SSID and password are entered, and try restarting the network interface with sudo systemctl restart networking.
2. Package Installation Errors
Problem: Encounter errors while installing packages with apt.
Solution:
Check for any typos in the package names or repository URLs.
Ensure that the package repositories are configured correctly by inspecting /etc/apt/sources.list and files in /etc/apt/sources.list.d/.
If encountering dependency issues, try running sudo apt --fix-broken install to resolve them automatically.
3. Hardware Compatibility Issues
Problem: Certain hardware components or peripherals are not recognized or functioning properly.
Solution:
Verify that the hardware is compatible with the Jetson Nano by checking manufacturer specifications or community forums.
Check for any firmware updates or driver installations required for the hardware to work with the Jetson Nano.
Test the hardware on another device or platform to confirm functionality, if possible.
4. System Freezes or Crashes
Problem: The Jetson Nano freezes or crashes unexpectedly during operation.
Solution:
Check system resource usage using tools like top or htop to identify any processes consuming excessive CPU or memory.
Ensure that the power supply is adequate and stable, as insufficient power can cause system instability.
Check system logs for error messages or warnings that might indicate the cause of the issue (/var/log/syslog, /var/log/kern.log, etc.).
5. Display or Graphics Issues
Problem: Encounter issues with the display output or graphics acceleration.
Solution:
Verify that the display cable is securely connected to the Jetson Nano’s HDMI or DisplayPort interface.
Check display settings and resolution configuration using the system settings or xrandr command.
Ensure that the appropriate NVIDIA drivers are installed and configured correctly for graphics acceleration.
If you encounter any other issues not covered here, feel free to seek assistance from the Jetson Nano community forums or NVIDIA support resources.
2 - OpenDevin Project Setup
A guide to set up your development environment for the OpenDevin project
Setting Up Your Development Environment
This guide will walk you through the steps to set up your development environment for the OpenDevin project. We’ll cover the installation of required tools, libraries, and dependencies, as well as the configuration of your project environment.
Prerequisites
Before you begin, ensure that you have the following prerequisites installed:
Ubuntu 22.04 LTS
Git
Step 1: Download Ubuntu 22.04
If you haven’t already, download the Ubuntu 22.04 LTS desktop version from the official Ubuntu website.
Step 2: Install Required Packages
Open the terminal and run the following commands to install the necessary packages:
With your Conda environment activated, install Pipenv:
python -m pip install pipenv
3. Set Up Your Project with Pipenv
Navigate to your project directory and initialize your environment with Pipenv:
python -m pipenv install -v
4. Activate the Pipenv Shell
To work within your project’s virtual environment, activate the Pipenv shell:
python -m pipenv shell
5. Run Your Application
With the project’s virtual environment activated, you can start your application. For example, to run a FastAPI application using uvicorn:
uvicorn your_project.server:app --port 3000
Replace your_project.server:app with the appropriate Python module path for your application.
6. Set Up the Frontend (if applicable)
If your project includes a frontend that uses Node.js and npm, navigate to the frontend directory from a new terminal or tab (to keep the backend server running). Install the required npm packages:
cd frontend
npm install
Start the frontend development server:
npm start
Resuming Your Project Work
Whenever you start a new terminal session and want to work on your project, follow these steps:
Activate your Conda environment:
conda activate opendevin
Navigate to your project directory and activate the Pipenv environment:
cd /path/to/your/project
python -m pipenv shell
Start your backend application (if applicable):
uvicorn your_project.server:app --port 3000
If you have a separate frontend, open a new terminal or tab, activate your Conda environment (conda activate opendevin), navigate to the frontend directory, and start the development server:
cd /path/to/your/frontend
npm start
Resuming Your Project Work
Activate Your Conda Environment:
Whenever you start a new terminal session and want to work on your project, the first step is to activate the Conda environment you created for your project. Use the command below, replacing myenv with the name of your Conda environment:
conda activate myenv
This step ensures that any Python or command-line tools you use are limited to the dependencies and versions installed within this environment, maintaining project consistency and avoiding conflicts with other projects.
Activate Your Pipenv Environment:
Next, navigate to your project directory where your Pipfile exists and activate the Pipenv environment. This step is crucial if you’re working on Python projects managed by Pipenv, as it ensures you’re using the correct versions of Python packages specified for your project:
cd /path/to/your/project
python -m pipenv shell
This command activates the virtual environment for your project, configured by Pipenv. You’ll need to do this every time you work on your project to ensure you’re using the right Python environment.
Start Your Backend Application:
If your project includes a backend component (like a FastAPI application), start it with the relevant command. For a FastAPI app using Uvicorn, for example:
uvicorn your_project.server:app --port 3000
Make sure to replace your_project.server:app with the path to your application’s main module. This command needs to be run from within the Pipenv shell activated in step 2.
Start Your Frontend Development Server:
If you have a frontend that runs separately (like a React or Vue application), you’ll need to open a new terminal or a new tab. If the frontend requires any environment configurations from the Conda environment, activate the Conda environment again with conda activate myenv. Then navigate to your frontend directory:
cd /path/to/your/frontend
npm start
This step launches the development server for your frontend, often with live reloading enabled, so you can continue working on the frontend with immediate feedback on changes.
Code example
#!/bin/bash
# Set configuration variablesCUDA_VERSION="12.4.0"ANACONDA_VERSION="2024.02-1"UBUNTU_VERSION=$(lsb_release -rs)# Define functionsinstall_nvidia_drivers(){echo"Installing NVIDIA drivers..." sudo ubuntu-drivers install
}install_cuda(){echo"Installing CUDA Toolkit $CUDA_VERSION..." wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu${UBUNTU_VERSION/./}/x86_64/cuda-ubuntu${UBUNTU_VERSION//.}.pin
sudo mv cuda-ubuntu${UBUNTU_VERSION//.}.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/${CUDA_VERSION}/local_installers/cuda-repo-ubuntu${UBUNTU_VERSION/./}-${CUDA_VERSION/-/_}-local_${CUDA_VERSION/-/_}-550.54.14-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu${UBUNTU_VERSION/./}-${CUDA_VERSION/-/_}-local_${CUDA_VERSION/-/_}-550.54.14-1_amd64.deb
sudo cp /var/cuda-repo-ubuntu${UBUNTU_VERSION/./}-${CUDA_VERSION/-/_}-local/cuda-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cuda-toolkit-${CUDA_VERSION/-/.} sudo apt-get install -y cuda-drivers
}install_docker(){echo"Installing Docker..." sudo apt-get install -y ca-certificates curl software-properties-common
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"| sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
echo"Setting up Docker to run without sudo..." sudo groupadd docker
sudo usermod -aG docker $USERecho"Log out and log back in for the changes to take effect."echo"After logging back in, you can run 'docker run hello-world' to verify that Docker is running without sudo."}install_anaconda(){echo"Installing Anaconda $ANACONDA_VERSION..." sudo apt-get install -y libgl1-mesa-glx libegl1-mesa libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6
curl -o ~/Downloads/Anaconda3-${ANACONDA_VERSION}-Linux-x86_64.sh https://repo.anaconda.com/archive/Anaconda3-${ANACONDA_VERSION}-Linux-x86_64.sh
chmod +x ~/Downloads/Anaconda3-${ANACONDA_VERSION}-Linux-x86_64.sh
bash ~/Downloads/Anaconda3-${ANACONDA_VERSION}-Linux-x86_64.sh -b
}install_ollama(){echo"Installing Ollama..." curl -fsSL https://ollama.com/install.sh | sh
}install_nodejs(){echo"Installing Node.js and npm..." sudo apt update
sudo apt install -y nodejs npm
}pull_docker_image(){echo"Pulling Docker image..." docker pull ghcr.io/opendevin/sandbox:latest
}# Check for prerequisitescheck_prerequisites(){if[ ! -d /etc/apt/keyrings ];then sudo mkdir -p /etc/apt/keyrings
fiif ! command -v wget &> /dev/null;then sudo apt-get install -y wget
fiif["$(uname -m)" !="x86_64"];thenecho"This script is only supported on x86_64 architecture."exit1fiif[ ! -d ~/Downloads ];then mkdir ~/Downloads
fi}# Uninstall functionuninstall(){echo"Uninstalling installed packages..." sudo apt-get remove -y --autoremove cuda-toolkit-${CUDA_VERSION/-/.} cuda-drivers docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin nodejs npm
rm -rf ~/anaconda3
sudo rm -rf /etc/apt/keyrings/docker.gpg /etc/apt/sources.list.d/docker.list /var/lib/docker /var/lib/containerd
}# Main scriptcheck_prerequisites
echo"This script will install the following packages:"echo"- NVIDIA drivers"echo"- CUDA Toolkit $CUDA_VERSION"echo"- Docker Engine"echo"- Anaconda $ANACONDA_VERSION"echo"- Ollama"echo"- Node.js and npm"echo"- Docker image: ghcr.io/opendevin/sandbox:latest"read -p "Do you want to continue? (y/n) " choice
case"$choice" in
y|Y) install_nvidia_drivers
install_cuda
install_docker
install_anaconda
install_ollama
install_nodejs
pull_docker_image
;; n|N)echo"Installation canceled."exit0;; *)echo"Invalid choice."exit1;;esacecho"Anaconda is installed. Please manually run 'source ~/anaconda3/bin/activate' and then 'conda init' to finish setting it up."echo"Remember to activate the Conda environment and follow the guide for any application-specific setup."