File Not Found When Running Docker Script But Is Found In Another Docker Script

  docker, linux

I am trying to run a script inside a docker that was published by google.
The command I use mounts some datafiles onto the docker in a file called ‘/input’ (inside the docker).
When I run the script, it says that it does not find the input file.
However, I do use the -v flag, and I ran a script that makes sure the input file is there (inside the docker).
So in summary – when I run

find /input -name "*.fasta"

It outputs:

/input/ucsc.hg19.chr20.unittest.fasta

As needed, but when I run the script, it says

./dv-quick-start: 19: ./dv-quick-start: --ref=/input/ucsc.hg19.chr20.unittest.fasta: not found

Full Script:

#!/bin/sh
BIN_VERSION="1.0.0"
INPUT_DIR="${PWD}/quickstart-testdata"
DATA_HTTP_DIR="https://storage.googleapis.com/deepvariant/quickstart-testdata"
OUTPUT_DIR="${PWD}/quickstart-output"

sudo docker run 
  -v "${INPUT_DIR}":"/input" 
  -v "${OUTPUT_DIR}":"/output" 
  google/deepvariant:"${BIN_VERSION}" 
  find /input -name "*.fasta"

sudo docker run 
  -v "${INPUT_DIR}":"/input" 
  -v "${OUTPUT_DIR}":"/output" 
  google/deepvariant:"${BIN_VERSION}" 
  /opt/deepvariant/bin/run_deepvariant 
  --model_type=WGS  **Replace this string with exactly one of the following [WGS,WES,PACBIO,HYBRID_PACBIO_ILLUMINA]**
  --ref=/input/ucsc.hg19.chr20.unittest.fasta 
  --reads=/input/NA12878_S1.chr20.10_10p1mb.bam 
  --regions "chr20:10,000,000-10,010,000" 
  --output_vcf=/output/output.vcf.gz 
  --output_gvcf=/output/output.g.vcf.gz 
  --intermediate_results_dir /output/intermediate_results_dir  **This flag is optional. Set to keep the intermediate results.

Full output:

/input/ucsc.hg19.chr20.unittest.fasta
--ref is required.
Pass --helpshort or --helpfull to see help on flags.
./dv-quick-start: 19: ./dv-quick-start: --ref=/input/ucsc.hg19.chr20.unittest.fasta: not found

I feel there is some misunderstanding on my behalf, and I would appreciate any help.
Should more information be needed to answer the question, let me know.

Source: Docker Questions

LEAVE A COMMENT