Errors while I'm trying to display the GUI of sikulix inside docker container

Asked by Marietto

Hello.

I would like to display the sikulix gui inside docker using xvfb,but unfortunately I get this error :

root@3cc9f4d62538:/addons# xvfb-run java -jar /sikulix/sikulixide-2.0.5.jar

[error] FileManager: writeStringToFile: did not work: /root/.Sikulix/SikulixStore/lastUsedJar.txt
/root/.Sikulix/SikulixStore/lastUsedJar.txt (No such file or directory)
[error] SikuliIDEI18N: no locale for en

this is my dockerfile :

FROM nvidia/cudagl:11.3.0-base-ubuntu20.04

LABEL Author="ZioMario <email address hidden>"
LABEL Title="Sikulix/Docker20.10.6/Ubuntu20.04"

# Enviorment variables

ENV HOME /home/sikulix
ENV DEBIAN_FRONTEND noninteractive
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
ENV VIRTUAL_ENV=/protected-env
ENV PATH "/protected-env/bin:/bin:/bin/2.82/python/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
ENV HW="GPU"
ENV JAVA_OPTIONS -Duser.home=/home/sikulix

RUN apt-get update && apt-get install -y curl apt-utils wget libopenexr-dev bzip2 build-essential zlib1g-dev libxmu-dev libxi-dev libxxf86vm-dev libfontconfig1 libxrender1 libgl1-mesa-glx xz-utils firefox default-jdk python3-numpy xvfb

RUN echo "Download and install SikuliX"

RUN mkdir /sikulix
RUN curl -L https://launchpad.net/sikuli/sikulix/2.0.5/+download/sikulixide-2.0.5.jar -o /sikulix/sikulixide-2.0.5.jar
RUN xvfb-run java -jar /sikulix/sikulixide-2.0.5.jar

# We need the following command to make sure to access /dev/snd/*

RUN usermod -aG audio root

# Set the working directory
WORKDIR /

Question information

Language:
English Edit question
Status:
Expired
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Marietto (marietto2008) said :
#1

when I press CTRL + C I see this error :

# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fbc0ef750ad, pid=59, tid=216
#
# JRE version: OpenJDK Runtime Environment (11.0.11+9) (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
# Java VM: OpenJDK 64-Bit Server VM (11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C [libjimage.so+0x30ad]
#
# Core dump will be written. Default location: /addons/core
#
# If you would like to submit a bug report, please visit:
# https://bugs.launchpad.net/ubuntu/+source/openjdk-lts

Revision history for this message
Marietto (marietto2008) said :
#2

I start the container with this script :

XSOCK=/tmp/.X11-unix

XAUTH=/tmp/.docker.xauth

touch $XAUTH

xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge -

docker run \

--gpus all \

--rm -it \

-v $XSOCK:$XSOCK:rw \

-v $XAUTH:$XAUTH:rw \

--device=/dev/dri/card0:/dev/dri/card0 \

-e DISPLAY=$DISPLAY \

-e XAUTHORITY=$XAUTH \

-w /protected \

-w /addons \

-v /:/addons \

-t test-docker

Revision history for this message
Marietto (marietto2008) said :
#3

I tried also without xvfb,but I get the same error :

Step 19/28 : RUN java -jar /sikulix/sikulixide-2.0.5.jar
---> Running in b2baaf91a40d
[error] FileManager: writeStringToFile: did not work:
/root/.Sikulix/SikulixStore/lastUsedJar.txt
/root/.Sikulix/SikulixStore/lastUsedJar.txt (No such file or directory)
The command '/bin/sh -c java -jar /sikulix/sikulixide-2.0.5.jar' returned a
non-zero code: 1

Il giorno mer 5 mag 2021 alle ore 00:25 Marietto <
<email address hidden>> ha scritto:

> Your question #696914 on SikuliX changed:
> https://answers.launchpad.net/sikuli/+question/696914
>
> Marietto posted a new comment:
> I start the container with this script :
>
>
> XSOCK=/tmp/.X11-unix
>
> XAUTH=/tmp/.docker.xauth
>
> touch $XAUTH
>
> xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge -
>
>
> docker run \
>
> --gpus all \
>
> --rm -it \
>
> -v $XSOCK:$XSOCK:rw \
>
> -v $XAUTH:$XAUTH:rw \
>
> --device=/dev/dri/card0:/dev/dri/card0 \
>
> -e DISPLAY=$DISPLAY \
>
> -e XAUTHORITY=$XAUTH \
>
> -w /protected \
>
> -w /addons \
>
> -v /:/addons \
>
> -t test-docker
>
> --
> You received this question notification because you asked the question.
>

--
Mario.

Revision history for this message
Launchpad Janitor (janitor) said :
#4

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Marietto (marietto2008) said :
#5

thanks. the customer care of sikuli is very good.