Bacalhau Docs
GithubSlackBlogEnterprise
v1.6.x
  • Documentation
  • Use Cases
  • CLI & API
  • References
  • Community
v1.6.x
  • Welcome
  • Getting Started
    • How Bacalhau Works
    • Getting Started
      • Step 1: Install the Bacalhau CLI
      • Step 2: Running Your Own Job
      • Step 3: Checking on the Status of Your Job
    • Creating Your Own Bacalhau Network
      • Setting Up a Cluster on Amazon Web Services (AWS) with Terraform 🚀
      • Setting Up a Cluster on Google Cloud Platform (GCP) With Terraform 🚀
      • Setting Up a Cluster on Azure with Terraform 🚀
    • Hardware Setup
    • Container Onboarding
      • Docker Workloads
      • WebAssembly (Wasm) Workloads
  • Setting Up
    • Running Nodes
      • Node Onboarding
      • GPU Installation
      • Job selection policy
      • Access Management
      • Node persistence
      • Configuring Your Input Sources
      • Configuring Transport Level Security
      • Limits and Timeouts
      • Test Network Locally
      • Bacalhau WebUI
      • Private IPFS Network Setup
    • Workload Onboarding
      • Container
        • Docker Workload Onboarding
        • WebAssembly (Wasm) Workloads
        • Bacalhau Docker Image
        • How To Work With Custom Containers in Bacalhau
      • Python
        • Building and Running Custom Python Container
        • Running Pandas on Bacalhau
        • Running a Python Script
        • Running Jupyter Notebooks on Bacalhau
        • Scripting Bacalhau with Python
      • R (language)
        • Building and Running your Custom R Containers on Bacalhau
        • Running a Simple R Script on Bacalhau
      • Run CUDA programs on Bacalhau
      • Running a Prolog Script
      • Reading Data from Multiple S3 Buckets using Bacalhau
      • Running Rust programs as WebAssembly (WASM)
      • Generate Synthetic Data using Sparkov Data Generation technique
    • Networking Instructions
      • Accessing the Internet from Jobs
      • Utilizing NATS.io within Bacalhau
    • GPU Workloads Setup
    • Automatic Update Checking
    • Marketplace Deployments
      • Google Cloud Marketplace
    • Inter-Nodes TLS
  • Guides
    • Configuration Management
    • Write a config.yaml
    • Write a SpecConfig
    • Using Labels and Constraints
  • Examples
    • Table of Contents for Bacalhau Examples
    • Data Engineering
      • Using Bacalhau with DuckDB
      • Ethereum Blockchain Analysis with Ethereum-ETL and Bacalhau
      • Convert CSV To Parquet Or Avro
      • Simple Image Processing
      • Oceanography - Data Conversion
      • Video Processing
      • Bacalhau and BigQuery
    • Data Ingestion
      • Copy Data from URL to Public Storage
      • Pinning Data
      • Running a Job over S3 data
    • Model Inference
      • EasyOCR (Optical Character Recognition) on Bacalhau
      • Running Inference on Dolly 2.0 Model with Hugging Face
      • Speech Recognition using Whisper
      • Stable Diffusion on a GPU
      • Stable Diffusion on a CPU
      • Object Detection with YOLOv5 on Bacalhau
      • Generate Realistic Images using StyleGAN3 and Bacalhau
      • Stable Diffusion Checkpoint Inference
      • Running Inference on a Model stored on S3
    • Model Training
      • Training Pytorch Model with Bacalhau
      • Training Tensorflow Model
      • Stable Diffusion Dreambooth (Finetuning)
    • Molecular Dynamics
      • Running BIDS Apps on Bacalhau
      • Coresets On Bacalhau
      • Genomics Data Generation
      • Gromacs for Analysis
      • Molecular Simulation with OpenMM and Bacalhau
    • Systems Engineering
      • Ad-hoc log query using DuckDB
  • References
    • Jobs Guide
      • Job Specification
        • Job Types
        • Task Specification
          • Engines
            • Docker Engine Specification
            • WebAssembly (WASM) Engine Specification
          • Publishers
            • IPFS Publisher Specification
            • Local Publisher Specification
            • S3 Publisher Specification
          • Sources
            • IPFS Source Specification
            • Local Source Specification
            • S3 Source Specification
            • URL Source Specification
          • Network Specification
          • Input Source Specification
          • Resources Specification
          • ResultPath Specification
        • Constraint Specification
        • Labels Specification
        • Meta Specification
      • Job Templates
      • Queuing & Timeouts
        • Job Queuing
        • Timeouts Specification
      • Job Results
        • State
    • CLI Guide
      • Single CLI commands
        • Agent
          • Agent Overview
          • Agent Alive
          • Agent Node
          • Agent Version
        • Config
          • Config Overview
          • Config Auto-Resources
          • Config Default
          • Config List
          • Config Set
        • Job
          • Job Overview
          • Job Describe
          • Job Executions
          • Job History
          • Job List
          • Job Logs
          • Job Run
          • Job Stop
        • Node
          • Node Overview
          • Node Approve
          • Node Delete
          • Node List
          • Node Describe
          • Node Reject
      • Command Migration
    • API Guide
      • Bacalhau API overview
      • Best Practices
      • Agent Endpoint
      • Orchestrator Endpoint
      • Migration API
    • Node Management
    • Authentication & Authorization
    • Database Integration
    • Debugging
      • Debugging Failed Jobs
      • Debugging Locally
    • Running Locally In Devstack
    • Setting up Dev Environment
  • Help & FAQ
    • Bacalhau FAQs
    • Glossary
    • Release Notes
      • v1.5.0 Release Notes
      • v1.4.0 Release Notes
  • Integrations
    • Apache Airflow Provider for Bacalhau
    • Lilypad
    • Bacalhau Python SDK
    • Observability for WebAssembly Workloads
  • Community
    • Social Media
    • Style Guide
    • Ways to Contribute
Powered by GitBook
LogoLogo

Use Cases

  • Distributed ETL
  • Edge ML
  • Distributed Data Warehousing
  • Fleet Management

About Us

  • Who we are
  • What we value

News & Blog

  • Blog

Get Support

  • Request Enterprise Solutions

Expanso (2025). All Rights Reserved.

On this page
  • Pre-requisites
  • Install Bacalhau
  • Start the cluster
  • New Terminal Window
  • Submit a simple job
  • Support

Was this helpful?

Export as PDF
  1. References

Running Locally In Devstack

How to run a Bacalhau devstack locally

PreviousDebugging LocallyNextSetting up Dev Environment

Was this helpful?

You can run a stand-alone Bacalhau network on your computer with the following guide.

The devstack command of bacalhau will start a 4 node cluster with 3 compute and 1 requester nodes.

This is useful to kick the tires and/or developing on the codebase. It's also the tool used by some tests.

Pre-requisites

  1. x86_64 or ARM64 architecture

    1. Ubuntu 20.0+ has most often been used for development and testing

Install Bacalhau

You can install the Bacalhau CLI by running this command in a terminal:

curl -sL https://get.bacalhau.org/install.sh | bash

See the for more installation options.

Start the cluster

bacalhau devstack

This will start a 4 node Bacalhau cluster.

bacalhau devstack \
--config InputSources.Types.IPFS.Endpoint=/ip4/127.0.0.1/tcp/5001 \
--config Publishers.Types.IPFS.Endpoint=/ip4/127.0.0.1/tcp/5001

Once everything has started up - you will see output like the following:

Devstack is ready!
No. of requester only nodes: 1
No. of compute only nodes: 3
No. of hybrid nodes: 0
To use the devstack, run the following commands in your shell:

export BACALHAU_API_HOST=0.0.0.0
export BACALHAU_API_PORT=34217
bacalhau node list
 ID      TYPE       APPROVAL  STATUS     LABELS                                              CPU     MEMORY      DISK         GPU  
 node-0  Requester  APPROVED  CONNECTED  Architecture=amd64 Operating-System=linux                                                 
                                         env=devstack id=node-0 name=node-0                                                        
 node-1  Compute    APPROVED  CONNECTED  Architecture=amd64 Operating-System=linux           1.4 /   2.7 GB /    13.1 GB /    0 /  
                                         env=devstack id=node-1 name=node-1                  1.4     2.7 GB      13.1 GB      0    
 node-2  Compute    APPROVED  CONNECTED  Architecture=amd64 Operating-System=linux           1.4 /   2.7 GB /    13.1 GB /    0 /  
                                         env=devstack id=node-2 name=node-2                  1.4     2.7 GB      13.1 GB      0    
 node-3  Compute    APPROVED  CONNECTED  Architecture=amd64 Operating-System=linux           1.4 /   2.7 GB /    13.1 GB /    0 /  
                                         env=devstack id=node-3 name=node-3                  1.4     2.7 GB      13.1 GB      0    

New Terminal Window

Open an additional terminal window to be used for submitting jobs. Copy and paste environment variables from previous message into this window, e.g.:

export BACALHAU_API_HOST=0.0.0.0
export BACALHAU_API_PORT=34217

You are now ready to submit a job to your local devstack.

Submit a simple job

This will submit a simple job to a single node:

bacalhau docker run \
--publisher local \
alpine echo "hello devstack test"

This should output something like the following:

Job successfully submitted. Job ID: j-5b0ee6dd-6080-4277-99ce-fdf179907b25
Checking job status... (Enter Ctrl+C to exit at any time, your job will continue running):

 TIME          EXEC. ID    TOPIC            EVENT         
 11:06:24.789              Submission       Job submitted 
 11:06:24.798  e-4fba1f7c  Scheduling       Requested execution on node-1 
 11:06:24.828  e-4fba1f7c  Execution        Running 
 11:06:25.173  e-4fba1f7c  Execution        Completed successfully 
                                             
To get more details about the run, execute:
	bacalhau job describe j-5b0ee6dd-6080-4277-99ce-fdf179907b25

To get more details about the run executions, execute:
	bacalhau job executions j-5b0ee6dd-6080-4277-99ce-fdf179907b25
To download the results, execute:
	bacalhau job get j-5b0ee6dd-6080-4277-99ce-fdf179907b25
bacalhau job describe j-5b0ee6dd-6080-4277-99ce-fdf179907b25

This should output info about job execution and results:

ID            = j-5b0ee6dd-6080-4277-99ce-fdf179907b25
Name          = j-5b0ee6dd-6080-4277-99ce-fdf179907b25
Namespace     = default
Type          = batch
State         = Completed
Count         = 1
Created Time  = 2024-10-30 10:06:24
Modified Time = 2024-10-30 10:06:25
Version       = 0

Summary
Completed = 1

Job History
 TIME                 TOPIC         EVENT         
 2024-10-30 11:06:24  Submission    Job submitted 
 2024-10-30 11:06:24  State Update  Running       
 2024-10-30 11:06:25  State Update  Completed     

Executions
 ID          NODE ID  STATE      DESIRED  REV.  CREATED    MODIFIED   COMMENT 
 e-4fba1f7c  node-1   Completed  Stopped  6     6m11s ago  6m11s ago          

Execution e-4fba1f7c History
 TIME                 TOPIC       EVENT                         
 2024-10-30 11:06:24  Scheduling  Requested execution on node-1 
 2024-10-30 11:06:24  Execution   Running                       
 2024-10-30 11:06:25  Execution   Completed successfully        

Standard Output
hello devstack test
bacalhau job get j-5b0ee6dd-6080-4277-99ce-fdf179907b25

Results will be downloaded to the current directory. Job results should have the following structure:

j-5b0ee6dd/
├── exitCode
├── stderr
└── stdout

If you execute cat stdout it should read hello devstack test. If you write any files in your job, they will appear in volumes/output.

Support

You can use and connect it to the devstack by setting the IPFS endpoints via : InputSources.Types.IPFS.Endpoint and Publishers.Types.IPFS.Endpoint

The message above contains the environment variables you need for a new terminal window. You can paste these into a new terminal so that bacalhau will use your local devstack. Execute the command to see the devstack cluster structure:

Use command to view results:

Use command to download job results:

If you have questions or need support or guidance, please reach out to the (#general channel).

Docker Engine
Latest Bacalhau release
installation guide
your own IPFS node
configuration keys
bacalhau node list
bacalhau job describe
Bacalhau team via Slack
bacalhau job get