Help to make Mod SDK work in docker

Hi,
I wanted to investigate a bit the LV2 using the docker. Installation worked great, as described in wiki, I could install it great, and I think I was able to build the ge-amp plugin.

To install the plugin In the wiki it’s suggested to use the Mod SDK ton install the plugin, so I:

  • cloned modSDK from github
  • sudo apt-get install liblilv-dev phantomjs python3-pil python3-pystache python3-tornado
  • and then tried to build it with: python3 setup.py build
    Bu then I got an error:
    Traceback (most recent call last):
    File "setup.py", line 5, in <module> from setuptools import setup, find_packages ImportError: No module named 'setuptools'

this is clearly an area where I need to learn, so I’m a bit lost on how to get on with this. I guess I’m missing setuptools somehow…
thanks in advance for any help :smiley:

Install setuptools then and run it again.

sudo apt-get install python3-setuptools

Thanks a lot…
Sorry, I have a follow-up… I could build it, but I cannot find the executable.
For example I can see:
builder@4d7286d6be02:~/mod-sdk/build/lib/modsdk$ ls __init__.py lilvlib.py screenshot.py settings.py utils.py webserver.py

but cannot run modsdk as per the wiki suggest.
Would you have any clue ?

You either install and run ‘modsdk’ or locally run ‘./development_server.py’.

Sorry I meant I installed it as follow, and then tried to run it but cannot find the executable modsdk

builder@4d7286d6be02:~/mod-sdk$ sudo python3 setup.py build running build running build_py creating build creating build/lib creating build/lib/modsdk copying modsdk/webserver.py -> build/lib/modsdk copying modsdk/utils.py -> build/lib/modsdk copying modsdk/settings.py -> build/lib/modsdk copying modsdk/lilvlib.py -> build/lib/modsdk copying modsdk/__init__.py -> build/lib/modsdk copying modsdk/screenshot.py -> build/lib/modsdk running egg_info creating modsdk.egg-info writing dependency_links to modsdk.egg-info/dependency_links.txt writing requirements to modsdk.egg-info/requires.txt writing top-level names to modsdk.egg-info/top_level.txt writing modsdk.egg-info/PKG-INFO writing entry points to modsdk.egg-info/entry_points.txt writing manifest file 'modsdk.egg-info/SOURCES.txt' reading manifest file 'modsdk.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'modsdk.egg-info/SOURCES.txt' make: Entering directory '/home/builder/mod-sdk/utils' g++ utils_lilv.cpp -Wall -Wextra -Wshadow -std=gnu++0x -fPIC -O3 -DHAVE_NEW_LILV -I/usr/include/sratom-0 -I/usr/include/ sord-0 -I/usr/include/serd-0 -I/usr/include/lilv-0 -c -o utils_lilv.cpp.o g++ utils_lilv.cpp.o -Wl,-O1 -Wl,--no-undefined -Wl,--strip-all -shared -llilv-0 -ldl -lsratom-0 -lsord-0 -lserd-0 -o li bmod_utils.so make: Leaving directory '/home/builder/mod-sdk/utils' builder@4d7286d6be02:~/mod-sdk$ modsdk bash: modsdk: command not found

It’s probably a misunderstanding on my side as I’m not well-versed in Linux.

you forgot the “sudo python3 setup.py install”

1 Like

Oups… :blush:
thanks a lot !

Hi
I do not have edit rights for the wiki, so I would recommend amending the page:
http://wiki.moddevices.com/wiki/How_To_Use_Docker_Toolbox_With_MPB
showing the command:
$ docker run -ti --name mpb moddevices/mod-plugin-builder
to
$ docker run -ti --name mpb -p 9000:9000 moddevices/mod-plugin-builder
In case somebody wants to run MOD SDK, as there is need to at least map the port 9000 to the host to access it.
thanks

… stuck again… modsdk does not see the plugins.

  • I build the plugin eg-amp
    builder@1f4c2229c224:~/mod-workdir/plugins$ ls eg-amp.lv2
  • I did the export as per the wiki:
    builder@1f4c2229c224:~$ export LV2_PATH=~mod-workdir/plugins/ builder@1f4c2229c224:~$ modsdk
    -> MOD-SDK server is running fine in a docker, and I can access it through Chrome. I get no error in javascript console, but the page shows:

No bundles found ! Install some LV2 plugins please.

I know I will also have to open the ports of the docker to see the mod Duo but I don’t think it’s the issue at this stage.

You are missing a slash after tilde:

export LV2_PATH=~/mod-workdir/plugins/

@ricardocrudo & @falkTX Thanks a lot for your help, and sorry for my beginner mistakes.
I hope they will help others.

I see the bundle :smiley:

When I use mod SDK I get two errors (generating the icon screenshot, and trying to deploy the bundle - the bundle can be deployed with the curl it works well).
Would you recommend posting those issues directly on gitHub, or recreate another forum thread ?

thanks again
Edit: removed french, and added question

screenshots use phantomjs, so you need to install that inside docker to enable them.

phantomjs is already installed. The server crashes when I click on ‘generate Images’ of the ‘screenshot’ tab, client side is nothing beyond the server crashed, server side I can see:

QXcbConnection: Could not connect to display PhantomJS has crashed. Please read the bug reporting guide at <http://phantomjs.org/bug-reporting.html> and file a bug report. ERROR:tornado.application:Uncaught exception GET /screenshot?uri=http%3A%2F%2Flv2plug.in%2Fplugins%2Feg-amp&width=230&height=431 (1 72.17.0.1) HTTPServerRequest(protocol='http', host='localhost:9000', method='GET', uri='/screenshot?uri=http%3A%2F%2Flv2plug.in%2Fplugins%2Feg -amp&width=230&height=431', version='HTTP/1.1', remote_ip='172.17.0.1', headers={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64 ) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36', 'Cookie': 'Webstorm-d6beae56=5a0ac67e-7507-42a5-a2e8- 63febefe14f3', 'X-Requested-With': 'XMLHttpRequest', 'Accept': 'application/json, text/javascript, */*; q=0.01', 'Referer': 'http:/ /localhost:9000/', 'Host': 'localhost:9000', 'Connection': 'keep-alive', 'Accept-Encoding': 'gzip, deflate, sdch', 'Accept-Language ': 'fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4'}) Traceback (most recent call last): File "/usr/lib/python3/dist-packages/tornado/web.py", line 1369, in _stack_context_handle_exception raise_exc_info((type, value, traceback)) File "<string>", line 3, in raise_exc_info File "/usr/lib/python3/dist-packages/tornado/stack_context.py", line 314, in wrapped ret = fn(*args, **kwargs) File "/usr/local/lib/python3.5/dist-packages/modsdk/webserver.py", line 387, in proc_callback fh = open(fname, 'rb') FileNotFoundError: [Errno 2] No such file or directory: '/tmp/f2c776.png' ERROR:tornado.access:500 GET /screenshot?uri=http%3A%2F%2Flv2plug.in%2Fplugins%2Feg-amp&width=230&height=431 (172.17.0.1) 118.31ms

Hope it makes sense somehow

Seems like the phantomjs version used in docker is bad, it’s crashing :frowning:
Maybe it needs some environment variables, not sure…

tbh I never ran mod-sdk inside docker before (I was missing the -p 9000:9000, so I couldn’t get it to work).
I’ll try it here soon and let you know if I find something new.

The 2nd issue I have is when I try to deploy through ModSDK (it works well with the CURL). on the ‘deploy’ tab, I input: 192.168.51.1:888 for the device adress (I can ping 192.168.51.1 from the docker), and the server crashes with:

ERROR:tornado.application:Uncaught exception POST /config/set (172.17.0.1) HTTPServerRequest(protocol='http', host='localhost:9000', method='POST', uri='/config/set', version='HTTP/1.1', remote_ip='172.17.0 .1', headers={'Host': 'localhost:9000', 'Accept': 'application/json, text/javascript, */*; q=0.01', 'Content-Length': '37', 'Accept -Language': 'fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4', 'Referer': 'http://localhost:9000/', 'Accept-Encoding': 'gzip, deflate', 'Conten t-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'Connection': 'keep-alive', 'Origin': 'http://localhost:9000', 'Cookie ': 'Webstorm-d6beae56=5a0ac67e-7507-42a5-a2e8-63febefe14f3', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36', 'X-Requested-With': 'XMLHttpRequest'}) Traceback (most recent call last): File "/usr/lib/python3/dist-packages/tornado/web.py", line 1413, in _execute result = method(*self.path_args, **self.path_kwargs) File "/usr/local/lib/python3.5/dist-packages/modsdk/webserver.py", line 559, in post os.mkdir(confdir) FileNotFoundError: [Errno 2] No such file or directory: '/home/builder/.local/share/mod-data' ERROR:tornado.access:500 POST /config/set (172.17.0.1) 1.69ms

thanks :smiley:

Hey @leDamien

if you want a user for the wiki just let us know and we create one for you. We blocked the user creation due to spamming attacks, but the idea is surely to have people contributing.

best

1 Like

I already added your recommendation on the page btw.
Sorry I forgot to mention it earlier.

if you want a user for the wiki just let us know and we create one for you. We blocked the user creation due to spamming attacks, but the idea is surely to have people contributing.

@gianfranco thanks for another time that could be great.
I think I created a user for the wiki (leDamien) but it’s just reading rights from what I could see.

Hi,

I saw there was a new docker pushed 12 days ago, so I tried it to see if the two issues mentioned above with modsdk were still there. Unfortunately yes. I searched them a bit, but it’s really too cryptic for me.
@falkTX did you had any time to look at them ?

thanks