简体   繁体   中英

Gimp won't run on cloud run but works from local dockers image

As the title states, I'm trying to run gimp through a Node.js docker image. I have this working locally, however I get the following error trying to run gimp commands while it is being deployed on google cloud run:

GIMP-Warning: The batch interpreter 'plug-in-script-fu-eval' is not available. Batch mode disabled.

The line of code that triggers this error:

exec('gimp --batch-interpreter plug-in-script-fu-eval -i --verbose -d -f -b 'MY COMMAND', {env:process.env})

The odd thing mostly being that it runs completely fine locally. My dockerfile:

FROM debian:latest
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY . .
RUN apt-get update 
RUN apt-get install -y gimp --no-install-recommends 
RUN apt-get install -y python
RUN rm -rf /var/lib/apt/lists/*
RUN apt-get update
RUN apt-get -qq install curl
RUN apt-get install -y aptitude
RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash - && apt-get install -y nodejs && aptitude install -y npm
RUN apt-get update
RUN npm install
EXPOSE 8080
CMD ["npm", "start"]

Any idea why it might work locally but not while being deployed?

The fix was to change the cloud run container's Execution environment from "Default" to "Second Generation"

If you don't specify an interpreter, Gimp uses the default interpreter (which is script-fu), and it works all the same:

root@a610863f4e50:~# gimp  -i --verbose -d -f -b '(gimp-message "Hello from container !!!!!!!!!!!!!!")' -b '(gimp-quit 0)'
Parsing '/etc/gimp/2.0/gimprc' for configured language.
Parsing '/root/.config/GIMP/2.10/gimprc' for configured language.
No language property found.
INIT: gimp_load_config
Parsing '/root/.config/GIMP/2.10/unitrc'
Parsing '/etc/gimp/2.0/gimprc'
Parsing '/root/.config/GIMP/2.10/gimprc'
INIT: gimp_initialize
INIT: gimp_real_initialize
Parsing '/usr/lib/gimp/2.0/interpreters/default.interp'
Parsing '/usr/lib/gimp/2.0/environ/default.env'
INIT: gimp_restore
Parsing '/root/.config/GIMP/2.10/parasiterc'
Parsing '/root/.config/GIMP/2.10/colorrc'
Parsing '/root/.config/GIMP/2.10/templaterc'
INIT: gimp_real_restore
Parsing '/root/.config/GIMP/2.10/pluginrc'
Querying plug-in: '/usr/lib/gimp/2.0/plug-ins/file-rawtherapee/file-rawtherapee'
Querying plug-in: '/usr/lib/gimp/2.0/plug-ins/file-darktable/file-darktable'
Initializing plug-in: '/usr/lib/gimp/2.0/plug-ins/file-rawtherapee/file-rawtherapee'
Initializing plug-in: '/usr/lib/gimp/2.0/plug-ins/file-darktable/file-darktable'
Writing '/root/.config/GIMP/2.10/pluginrc'
Starting extension: 'extension-script-fu'
No batch interpreter specified, using the default 'plug-in-script-fu-eval'.
script-fu-Warning: Hello from container !!!!!!!!!!!!!!

batch command executed successfully
EXIT: gimp_exit
EXIT: gimp_real_exit
Terminating plug-in: '/usr/lib/gimp/2.0/plug-ins/script-fu/script-fu'
Terminating plug-in: '/usr/lib/gimp/2.0/plug-ins/script-fu/script-fu'
Writing '/root/.config/GIMP/2.10/colorrc'
Writing '/root/.config/GIMP/2.10/templaterc'
Writing '/root/.config/GIMP/2.10/parasiterc'
Writing '/root/.config/GIMP/2.10/unitrc'
EXIT: app_exit_after_callback

(by the way, --batch-interpreter plug-in-script-fu-eval doesn't work in the local container for me...)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM