lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Frescobaldi incantation for lilypond docker image?


From: Jean Abou Samra
Subject: Re: Frescobaldi incantation for lilypond docker image?
Date: Wed, 13 Jul 2022 18:02:47 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

Le 13/07/2022 à 16:31, Graham King a écrit :

I'm looking for a way to run a recent lilypond version on Ubuntu 18.04.

Currently, I have a docker image[1] of lilypond 2.23.10 that I can invoke successfully from the command line, using:

docker run -v $(pwd):/app -w /app jeandeaual/lilypond:devel lilypond foo.ly

The challenge is getting a locally-installed Frescobaldi 3.2 to run this image.

In Frescobaldi's Preferences, I've set the lilypond command to:

docker run -v $(pwd):/app -w /app jeandeaual/lilypond:devel lilypond

But when I try to run lilypond from within Frescobaldi, I get the following error:

Traceback (most recent call last):

File "/home/xxxx/git/frescobaldi/frescobaldi/frescobaldi_app/engrave/__init__.py", line 145, in engravePreview

self.engrave('preview')

File "/home/xxxx/git/frescobaldi/frescobaldi/frescobaldi_app/engrave/__init__.py", line 200, in engrave

self.runJob(job_class(doc, args), doc)

File "/home/xxxx/git/frescobaldi/frescobaldi/frescobaldi_app/engrave/__init__.py", line 252, in runJob

job.manager.manager(document).start_job(j)

File "/home/xxxx/git/frescobaldi/frescobaldi/frescobaldi_app/job/manager.py", line 61, in start_job

job.start()

File "/home/xxxx/git/frescobaldi/frescobaldi/frescobaldi_app/job/__init__.py", line 225, in start

self._update_process_environment()

File "/home/xxxx/git/frescobaldi/frescobaldi/frescobaldi_app/job/__init__.py", line 304, in _update_process_environment

se.remove(k) if v is None else se.insert(k, v)

TypeError: arguments did not match any overloaded call:

insert(self, str, str): argument 2 has unexpected type 'bool'

insert(self, QProcessEnvironment): argument 1 has unexpected type 'str'

So, two questions:

1.  How should I set up Frescobaldi to run the docker image?



I don't know why Frescobaldi crashes like this. Maybe try to upgrade it?

On the other hand, I don't think what you're doing is expected to work in this way (although it shouldn't result in a crash but graceful error handling, as it does for me -- the LilyPond version I'm inserting just gets a "no entry" symbol). "docker run ..." is a shell command. What you need to give to Frescobaldi is just an executable. When it calls LilyPond, there is no shell involved. It will likely try to find the executable "docker run ...", as if you had done in your shell:

"docker run ..." file.ly

(with quotes to make all that the name of the command being run).

If you really want Docker (but see below), you can put this in a script somewhere, called for example lilypond-docker.sh:

#!/bin/bash
docker run ... "$@"

Then you can use the full path to lilypond-docker.sh as the LilyPond executable in Frescobaldi.


2.  If I'm barking up the wrong tree entirely, what is the recommended way for Frescobaldi to run lilypond at a more recent version than the distro supplies?



There is no need for Docker at all! All versions of LilyPond have always supported being installed in parallel without conflicting. Furthermore, recent versions (2.23.6 and later) are static binaries. They don't even need installation, they can just be unpacked and run.

So, just download 2.23.10 from https://lilypond.org/development.html, unpack the archive, and in Frescobaldi, enter the full path /.../lilypond-2.23.10/bin/lilypond. And your LilyPond will be usable right away.

Best,
Jean




reply via email to

[Prev in Thread] Current Thread [Next in Thread]