Skip to content

AI Bottlenecks? Here’s How We Solved It Using dataClay & Docker

Notifications You must be signed in to change notification settings

sebasmos/EdgeAI-Continuum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LICENSE

Distributed AI Workload Management via Active Storage and dataClay.

Overview

This repository demonstrates how to offload artificial intelligence (AI) workloads across distributed systems using active storage architectures. It leverages dataClay and Docker to orchestrate and manage model training across a client-server infrastructure.

The dataset used in this repository is publicly available on Hugging Face:


📊 Offloading vs Standalone benchmark

🧠 Memory Usage Benchmark: This chart compares memory consumption across different configurations using and not using dataClay (a distributed data management system)

Memory Usage

⏱️ Runtimes benchmark: This chart visualizes the total execution time across baseline (an Edge device, e.g. OrangePI, a Mac) and offloaded (dataClay) setups (A high compute device).

Runtimes

📦 Project Structure

🔧 Server-Side Training with dataClay

To train a model on the server using dataClay:

  1. Open train_dataclay.py and set the correct server_ip.

  2. Ensure Docker Compose is up and running:

docker-compose up -d
  1. Define two experiment names:

    • client_experiment for storing client results.
    • experiment_name for storing server results.
  2. Run the training notebook:

./AIoffload/0_server_experiment.ipynb

🧪 Baseline (Non-dataClay) Training

For standalone (non-dataClay) experiments:

  1. Open the notebook:
./Baseline/1_client_experiment.ipynb
  1. Set experiment_name to track and store metrics and results.

⚙️ Environment Setup Instructions

You'll need to configure both the server and client environments.

🖥️ Server Setup

  1. Install Miniconda:
  • For Linux:

    wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
    bash Miniconda3-latest-Linux-x86_64.sh
  • For macOS:

    curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
    bash Miniconda3-latest-MacOSX-x86_64.sh
  1. Initialize Conda:
source ~/miniconda3/bin/activate
conda init

Then restart your terminal.

  1. Create and activate the server environment:
conda create -n server_env python=3.10.16 -y
conda activate server_env
  1. Clone the repository and install dependencies:
git clone <repository_url>
cd <repository_directory>
pip install -r requirements.txt

Make sure torch is included (add a specific CUDA version if needed).

  1. Start Docker + dataClay:
docker-compose down
docker-compose up -d

💻 Client Setup

  1. Install Miniconda (same steps as server).

  2. Create and activate the client environment:

conda create -n client_env python=3.10.16 -y
conda activate client_env
  1. Clone the repository and install dependencies:
git clone <repository_url>
cd <repository_directory>
pip install -r requirements-client.txt

⚠️ Do not include torch in client requirements if unnecessary.

  1. Install Jupyter Notebook:
conda install -c conda-forge notebook
  1. Launch Jupyter:
jupyter-notebook

🏅 Funding

🇪🇺 This work has received funding from the European Union’s HORIZON research and innovation programme under grant agreement No. 101070177.

Releases

No releases published

Packages

No packages published