Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run ripper in parallel due to Xvfb issue #7

Open
tbenst opened this issue Mar 18, 2021 · 1 comment
Open

Can't run ripper in parallel due to Xvfb issue #7

tbenst opened this issue Mar 18, 2021 · 1 comment

Comments

@tbenst
Copy link
Collaborator

tbenst commented Mar 18, 2021

When running more than one singularity or docker containers, I get xvfb-run: error: Xvfb failed to start
See https://stackoverflow.com/questions/30332137/xvfb-run-unreliable-when-multiple-instances-invoked-in-parallel for an explanation.. for docker I think the culprit is

--env=DISPLAY=:95 \

@jmdelahanty
Copy link

jmdelahanty commented Jan 24, 2022

Edit: It looks like you need to remove the xvfb environment specifications for this to work. I couldn't get it to run without removing them from the docker run command.

Related to this issue, It seems that if you do something like this in your setup you can spawn multiple containers from calling the script once:

Shell script:

sudo docker run \
       --rm \
       --volume=$2:/data \
       --volume=/scratch:/tmp \
       --volume=/snlkt/data/bruker_pipeline/logs:/logs \
       --env=USER_NAME=${USER} \
       --env=USER_UID=$(id -u ${USER}) \
       --env=USER_GID=$(id -g ${USER}) \
       --env=USER_HOME=${HOME} \
       --workdir=/home/${USER} \
       --env=TZ=America/Los_Angeles \
       --cpus 2 \
       --shm-size=1g \
       --name=$1 \
       snlkt-bruker-ripper:latest \
       /apps/runscript.sh $3 $4 $log_filename

runscript.sh command:

${CMDPREFIX} -a /usr/bin/python3 /apps/rip.py --directory $1 --ripper_version $2 --log_file $3

The -a command sets the xvfb-run step to Auto, so it will search for an available port and then select it for the virtual buffer! It works on the Salk cluster now at least in Docker, unsure if it will work with a Singularity container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants