Skip to content

dbehnke/urfd-docker

Repository files navigation

urfd-docker

Docker build environment for the Universal Multi-protocol Digital Voice Reflector (urfd) and the Transcoder (tcd), along with various vocoder libraries and the urfd-nng-dashboard.

Overview

This repository provides a multi-stage Dockerfile that compiles and packages:

  1. imbe_vocoder (software IMBE vocoder)
  2. md380_vocoder_dynarmic (software AMBE vocoder emulator)
  3. tcd (Transcoder)
  4. urfd (Universal Reflector)
  5. urfd-nng-dashboard (Web Dashboard - Frontend & Backend)

The final image is based on Ubuntu 24.04 and includes all necessary runtime libraries.

Prerequisites

  • Docker
  • Go-Task (for orchestrating the build on host)
    • Host machine installation:

      ```bash
      sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin
      ```
      

Directory Structure

urfd-docker/           <-- You are here
├── imbe_vocoder/      (submodule)
├── md380_vocoder_dynarmic/ (submodule)
├── tcd/               (submodule)
├── urfd/              (submodule)
├── urfd-nng-dashboard/ (submodule)
├── Dockerfile
├── Taskfile.yml       <-- Entry point
├── docker-compose.yml
├── tcd.mk
└── README.md

Setup

Initialize submodules:

git clone --recurse-submodules https://github.com/dbehnke/urfd-docker.git
cd urfd-docker

Or if already cloned:

git submodule update --init --recursive

Build Process

We use a Taskfile to orchestrate the build. This ensures that the Docker image is built with the correct versioning information derived from the urfd-nng-dashboard submodule.

graph TD
    A[Developer] -->|Run task build| B(Host: Taskfile.yml)
    B -->|Get Dashboard Submodule Commit| C[Git Metadata]
    B -->|Pass DASHBOARD_COMMIT| D[Docker Compose]
    D -->|Build Step| E[Dockerfile]

    subgraph "Dashboard Build (Taskfile)"
    E -->|Source Fetcher Stage| F[Clone Dashboard Repo @ Commit]
    F -->|Copy Source + .git| G[Frontend Builder]
    F -->|Copy Source + .git| H[Dashboard Builder]
    G -->|Run task build-frontend| I[Frontend Assets]
    H -->|Run task build-backend| J[Backend Binary]
    I -->|Copy Dist| J
    end

    subgraph "Legacy Build (Make)"
    E -->|Vocoder Builder| L[Build Vocoders]
    E -->|URFD Builder| M[Make URFD]
    E -->|TCD Builder| N[Make TCD]
    end

    J -->|Copy Binary| K[Final Image]
    M -->|Copy Binary| K
    N -->|Copy Binary| K

    style A fill:#f9f,stroke:#333
    style B fill:#bbf,stroke:#333
    style E fill:#bfb,stroke:#333
Loading

Building the Image

Run the build task from the root of the repository:

task build

This will:

  1. Verify/Retrieve the git commit of the currently checked-out urfd-nng-dashboard submodule.
  2. Pass this commit hash to Docker as a build argument.
  3. Execute docker compose build.

Running the Stack

To start the services (urfd, tcd, and dashboard):

task up

To stop:

task down

Configuration

Configuration files are expected in the ./config directory. The docker-compose.yml mounts this directory to the containers.

Development Notes

Build Strategies

  • Dashboard: Employs a "source-fetcher" strategy. The repo is cloned inside Docker at the specific commit hash to ensure Taskfile can generate accurate version strings using git describe.
  • URFD & TCD: These components are built using their traditional Makefile systems within their respective Docker builder stages (urfd-builder and tcd-builder).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published