Heavy plugin builder

This is a proof of concept Heavy/Pd build service.
Some expert knowledge (docker, python) is required to use it.

I made a rough derivative based on Gen~ and rnbo~ plugin builder

After doing this draft I’m now considering completely rewriting it in fastapi, eventually, as I think it could be much cleaner.
What I mainly like about the current version is the stdout, using websockets, on the right side for direct feedback about the compile.

What is currently missing is being able to upload an entire folder including required related abstractions and such. Also additional options in the build configuration are not in place yet (the DPF exporter in hvcc supports many more settings).

Please test and provide feedback about the procedure if you will :slight_smile:

6 Likes

hmmm test how?

Sorry, forgot to add the link at the end :smiley:

Great job, @dreamer ! Thanks a lot.

1 Like

Hey I would really love to try this, but I am a complete noob.
I just downloaded docker.
I ran this command in terminal: git clone https://github.com/Wasted-Audio/modheavy.git

This seems to look good:
% git clone GitHub - Wasted-Audio/modheavy: A docker container with a python script that allows building lv2 plugins from heavy compatible pure data patches for the mod.audio devices.
Cloning into ‘modheavy’…
remote: Enumerating objects: 86, done.
remote: Counting objects: 100% (86/86), done.
remote: Compressing objects: 100% (53/53), done.
remote: Total 86 (delta 39), reused 69 (delta 23), pack-reused 0
Receiving objects: 100% (86/86), 142.48 KiB | 3.10 MiB/s, done.
Resolving deltas: 100% (39/39), done.

Now how do I do this part?
Copy .env.example to .env

Are these also comands I have to run in terminal?

There is a file called .env.example and you can either copy it or rename it. How you do this action will depend on your operating system and environment.

Btw all these instructions are taken verbatim from the Gen~ and rnbo~ plugin builder

thx! I’m on OSx.
After runnnig the clone command, it made a folder on my computer named modheavy. The .env.example file is not there.
Should I download it from github and then rename it?

EDIT:
the file was hidden. I renamed it in finder.

Still I don’t know how I should run this command now
docker compose up -d modgen

You run it on the command-line. However I have 0 experience with MacOS so unfortunately can’t help with using docker there.
Good luck :slight_smile:

(and indeed any file or folder that begins with a . is automatically hidden in bash/zsh terminals)

Ok I think I run the command line correctly,
but after like 2 minutes I get this error:
=> => # [output clipped, log limit 2MiB reached]
failed to receive status: rpc error: code = Unavailable desc = error reading from server: EOF
simon@MacBook-Air-von-Simon modheavy %

I know you don’t know mac specifics, but any Idea what this could mean?

This is the whole log:
[+] Building 261.7s (10/22)
=> [modgen internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.37kB 0.0s
=> [modgen internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [modgen internal] load metadata for Docker 1.8s
=> [modgen 1/18] FROM Docker 0.0s
=> [modgen internal] load build context 0.0s
=> => transferring context: 38B 0.0s
=> CACHED [modgen 2/18] RUN apt-get update && apt-get install -y ac 0.0s
=> CACHED [modgen 3/18] RUN useradd -m modgen 0.0s
=> CACHED [modgen 4/18] WORKDIR /home/modgen 0.0s
=> CACHED [modgen 5/18] RUN git clone https://github.com/moddevices/mod 0.0s
=> CACHED [modgen 6/18] WORKDIR /home/modgen/mod-plugin-builder 0.0s
=> [modgen 7/18] RUN if [ true = true ]; then ./bootstrap.sh modd 259.9s
=> => # [EXTRA] Patching ‘binutils-2.26’
=> => # [EXTRA] Extracting ‘gcc-linaro-4.9-2017.01’
=> => # [EXTRA] Patching ‘gcc-linaro-4.9-2017.01’
=> => # [EXTRA] Extracting ‘glibc-2.21’
=> => # [01:33] \
=> => # [output clipped, log limit 2MiB reached]

No idea. Maybe it has some timeout on the docker install? It does take quite a while to setup the whole of MPB.

Afaik on MacOS docker runs inside a VM, perhaps that is causing an issue?

maybe the bootstrap is not using minimal target? that would save half the build time

It is: modheavy/Dockerfile at master · Wasted-Audio/modheavy · GitHub

I tried it several times, usually after like 2-3 min it kinda freezes.

I have no Idea what that means :exploding_head:

the process can take up to 3 hours depending on the machine. how long did you wait?

Well I waited till I got the second error:
failed to receive status: rpc error: code = Unavailable desc = error reading from server: EOF
That was usually after like 4 minutes

I ran the full build of the docker image on my workstation (Debian 11), which includes DuoX and Dwarf environments, and it took about ~1.5 hrs I estimate.

1 Like

I made some more attempts, and it did reach (11/22) and run for a bit longer (maybe 15min) but always getting into some kind of error.

Ah now it worked. But I get this error when trying to run it:
Cannot start Docker Compose application. Reason: compose [start] exit status 1. Container modheavy-modgen-1 Starting Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:5000 → 0.0.0.0:0: listen tcp 0.0.0.0:5000: bind: address already in use

It seems something else is running on that port?

Since the command drops the container into “daemon” mode it could be that it is running in the background.
Try a docker ps to show all currently running containers.

Otherwise you could change the port number in the docker-compose.yml to something else, say 5001.

1 Like

Yeah I tried to all kinds of commands to shut down the process on that port and ironically it was the modgen container itself.

I’ll try out your suggestions though, thanks!

Edit:

didnt show me anything.

you this by just editing the file?
Bildschirmfoto 2023-06-29 um 20.39.29

Still gives me the same error, claiming that 5000 (not 5001) is already in use.