Skip to content

treangenlab/omi-command-base

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

omi-command-base

This repository provides a Conda/Micromamba environment for managing workflows using Nextflow and Singularity (via Apptainer).

Installation

To create the environment, follow these steps:

1. Install Micromamba

If you don't have micromamba installed, you can download it by following the instructions on the official micromamba documentation.

For micromamba, you can use the following commands to download and install it:

curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba
sudo mv bin/micromamba /usr/local/bin/micromamba

2. Create the Environment

Once micromamba (or Conda) is installed, you can create the environment from the environment.yml file:

Using Micromamba

If you're using Micromamba, run the following command to create the environment:

micromamba env create -f environment.yml

Command Server

The omi-command-base package includes a FastAPI-based command execution server that provides a secure and isolated environment for running shell commands. The server exposes a REST API for command execution and monitoring.

Components

  • command_server.py: FastAPI server implementation for executing commands

Usage

  1. Update the conda environment to include FastAPI dependencies:
conda env update -f environment.yml
  1. If using tmux:

Lists active sessions (if any)

tmux list-sessions

Attach a new tmux session, then start the server by following steps below

tmux attach -t <name>

Kill a specific session

tmux kill-session -t <name>
  1. Start the command server:
uvicorn command_server:app --host 0.0.0.0 --port 8843

The server will run on http://terminator8.cs.rice.edu:8843 by default.

API Endpoints

  • POST /api/v1/commands: Submit a new command for execution
    {
      "command": "string",
      "file": "UploadFile",
      "working_directory": "string (optional)"
    }

About

Command mode setup instructions to interface with the omi-web-app here (https://github.com/ppreshant/omi-web-app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages