Ensembl / ensembl-vep

The Ensembl Variant Effect Predictor predicts the functional effects of genomic variants
https://www.ensembl.org/vep
Apache License 2.0
456 stars 153 forks source link

Dockerfile cant write to docker volumes on github build agents. #1434

Open PeterKnealeCMRI opened 1 year ago

PeterKnealeCMRI commented 1 year ago

Unable to write to volumes when running on github build agents

When running VEP within a docker container upon a github build agent I was unable to write output files to the mounted volume.

More specifically, I encounted the below error when attempting to set the --output-file parameter to a location that was a volume that was shared between the docker host and container such as /output/......

I believe this is due to the usage of the USER keyword within the dockerfile which is not supported by github See

  Ensure your Dockerfile does not set the USER instruction, otherwise you will not be able to access GITHUB_WORKSPACE.
  https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#file-systems

Checking a few other common dockerfiles, postgres/rabbit etc I find that they dont use the USER keyword in their dockerfiles

Additional information

System

Full VEP command line

docker run \
  --entrypoint vep \
  -v $(pwd)/vep:/data \
  ensemblorg/ensembl-vep:latest \
    --fork 4 \
    --biotype \
    --canonical \
    --distance 5000 \
    --species homo_sapiens \
    --merged \
    --use_given_ref \
    --symbol \
    --assembly GRCh38 \
    --cache \
    --offline \
    --no_stats \
    --buffer_size 3500 \
    --force_overwrite \
    --input_file /data/xxxx.acceptor.vcf \
    --output_file /data/xxxx.acceptor.vep

Full error message

-------------------- EXCEPTION --------------------
95 MSG: ERROR: Could not write to output file /data/xxxx.acceptor.vep

Data files (if applicable)

They include:

I'll provide a repro if you'd like further confirmation.

Workaround

nakib103 commented 1 year ago

@PeterKnealeCMRI ,

Thanks for flagging this issue. We will look more into and get back to you with more info.

Best regards, Nakib