gregsadetsky / rapidriteros

3 stars 2 forks source link

Rapid Riter OS

see a video here

what is this?

the "Rapid Riter" is a LED display from the 1980s (the copyright on the PCB says 1985), 96 pixels wide by 38 pixels high. it's both giant and tiny.

the display is currently installed at the Recurse Center

this repo/software runs on a connected raspberry pi and goes through "shows" i.e. text, p5.js scripts, and GLSL shaders, and renders them all on the LED display

(this repo) also presents a django-based web UI so that people can add/edit shows. that is mostly a work in progress.

the rapidriter/raspberry pi are hosted + deployed + managed using disco

thanks


how to start / run locally

pre-setup

run

cd web
source venv/bin/activate
./bin/serve.sh
cd worker
source venv/bin/activate
python worker.py
cd renderers/p5
source venv/bin/activate
python p5.py

Running everything in Docker

  1. Create a bridge network with docker network create rapidriter

  2. Build and run the web server

cd web

docker build -t rapidriteros/web .

docker run \
  --rm \
  --network=rapidriter \
  --name=rrweb \
  -p 8000:8000 \
  rapidriteros/web
  1. Build and run the worker

First, make sure you have a worker/.env that looks something like:

RENDERER_OSC_HOST=""
RENDERER_TEXT_HOST="http://rrtext:80"
RENDERER_SHADER_HOST=""
RENDERER_P5_HOST=""
RENDERER_WASM_HOST="http://rrwasm:80"

DO_NOT_SEND_TO_RITER="true"

WEB_SERVICE_HOST="http://rrweb:8000"

The rrtext, rrwasm, and rrweb refer to the other containers by their names using in-Docker networking.

cd worker

docker build -t rapidriteros/worker .

docker run \
  --rm \
  --volume .:/app \
  --network=rapidriter \
  rapidriteros/worker
  1. Build and run (for example) the text renderer
cd renderers/text

docker build -t rapidriteros/text .

docker run \
  --rm \
  --network=rapidriter \
  --name=rrtext \
  rapidriteros/text
  1. Add the WASM renderer for good measure
cd renderers/wasm

docker build -t rapidriteros/wasm .

docker run \
  --rm \
  --network=rapidriter \
  --name=rrwasm \
  rapidriteros/wasm