Using Docker to run Norns
See this GitHub repo:
If you have Docker running on your computer (tested with Linux and OS X), then you can run this command:
docker run --rm -it \ --ulimit rtprio=95 --ulimit memlock=-1 --shm-size=256m \ -p 5000:5000 -p 5555:5555 -p 5556:5556 \ samdoshi/norns-test-dummy
(FYI: it will download 500MB-1GB of data)
and visit http://127.0.0.1:5000/maiden/ in your browser. There is no audio.
ctrl-b d to exit.
For working audio and grid on Linux see
Audio on OS X
I’ve had a brief experimentation trying to run NetJack2 on OSX, but I couldn’t get the client inside the Docker container to see the host. According to this it works in principle. The issue might be due to how networking works with Docker for Mac.
An alternative idea might be to run
crone outside the container, but run
maiden inside. In particular
matron is the one that is heavily dependant on a Linux base.
(A futher note, SuperCollider won’t build with the default 2gb RAM that Docker for Mac allocates to the VM it uses, I had success with 4gb.)
Audio experiments with containers
See this gist for an example using ALSA and SuperCollider (Linux only).
jack2-dbus on my host computer – Arch Linux FYI.
I’m also using
catia to manage connections, once I’ve got some name stability with the containers I’ll try to automate connections with
jack_control stop # stop jack jack_control start # start jack jack_load netmanager # load the NetJack2 plugin # or combined (jack can get itself in a funk and sometimes needs a kick) jack_control stop && jack_control start && jack_load netmanager jack_lsp # list ports (i.e. inputs, outputs and apps) jack_lsp -c # list ports and connections
Using names with ALSA
ALSA hardware numbers can (and do) change, you can use hardware names instead of numbers when starting
$ cat /proc/asound/cards 0 [Crimson ]: USB-Audio - SPL Crimson Ploytec GmbH SPL Crimson at usb-0000:00:14.0-1, high speed 1 [PCH ]: HDA-Intel - HDA Intel PCH HDA Intel PCH at 0x13ffff10000 irq 47 2 [HDMI ]: HDA-Intel - HDA ATI HDMI HDA ATI HDMI at 0xfbd60000 irq 51 3 [PC4 ]: USB-Audio - Faderfox PC4 Faderfox Faderfox PC4 at usb-0000:00:14.0-3.2, full speed
Using the above info, you can change a
/usr/bin/jackd -R -d alsa -d hw:0
/usr/bin/jackd -R -d alsa -d hw:Crimson
Debugging inside a container
gdb against a process inside a container you must add
--cap-add=SYS_PTRACE --security-opt seccomp=unconfined to your
docker run command.
As an example, here is how to debug
matron, if we wish to debug an interaction with
maiden we need to attach to a running process due to using
$ docker exec --user=root -it <container name> bash # get a privileged user inside a running container # fyi, the following commands are now running in the container $ cd norns $ ps ax | grep matron # find the matron process (choose the one without ws-wrapper) $ gdb ./build/matron/matron <ps number> (gdb) continue # gdb will pause the process when it starts, so type 'continue' to start it again
- This GitHub repo has SuperCollider running inside a docker container, albeit with the sound card passed directly.
2018-09-08: Added link to the
norns-devGitHub repo, shortened old sections
2018-09-03: Added some OS X notes, X11 notes, and
- 2018-09-01: Created this first post