DataBiosphere / dsub

Open-source command-line tool to run batch computing tasks and workflows on backend services such as Google Cloud.
Apache License 2.0
265 stars 44 forks source link

"Error response from daemon: Mounts denied" using local provider on MacOS X #103

Open freezecoder opened 6 years ago

freezecoder commented 6 years ago

Hi,

I seem to have no success running the local provider dsub example

$ dsub --version dsub version: 0.1.5 (El Capitan) $uname -a Darwin zmac.home 15.6.0 Darwin Kernel Version 15.6.0: Thu Jun 23 18:25:34 PDT 2016; root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64

I am using Docker version 17.06.0-ce, build 02c1d87

FYI also I have gsutil and gcloud set up but I havent tested google cloud yet.


 dsub \
   --provider local \
   --logging /tmp/dsub-test/logging/ \
   --output OUT=/tmp/dsub-test/output/out.txt \
   --command 'echo "Hello World" > "${OUT}"' \
   --wait

I get the following errors and from the logs...

#STDERR
docker: Error response from daemon: Mounts denied: 
The path /var/folders/kn/zqhb955s3gn85dnflc6t871w0000gn/T/dsub-local/XXXX-180214-131452-166516/task/data/
is not shared from OS X and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> File Sharing.
See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.
.
time="2018-02-14T13:14:53-05:00" level=error msg="error waiting for container: context canceled" 

And from general log


2018-02-14 13:04:26 I: Localizing inputs.
2018-02-14 13:04:26 I: Checking image userid.
2018-02-14 13:04:27 I: Running Docker image.
2018-02-14 13:04:28 I: Docker exit code 1.
2018-02-14 13:04:28 I: Ensure host user (0:0) owns Docker-written data
2018-02-14 13:04:30 E: chown failed, Docker returned 1.
2018-02-14 13:04:30 I: Copying outputs.
2018-02-14 13:04:31 I: Delocalize logs and cleanup.
2018-02-14 13:04:31 I: Copying the logs before cleanup

I have docker installed and running fine, I can do a regular 'docker run' command on any of my local images and it works fine.

I am very keen to get dsub working if possible.

Thanks

mbookman commented 6 years ago

Thanks for reporting this problem.

dsub development of the local provider has been on linux, so we may find some small issues on other *nix-es.

I reproduced the same problem and attempted to work around it by fiddling with the Docker Preferences (as instructed in the log).

I didn't get far with that, but was able to get things running, simply by setting a new TMPDIR.

In my dsub directory:

$ mkdir tmp
$ export TMPDIR=tmp
$ dsub --provider local --logging /tmp/logs/ --command 'echo hello' --wait
Job: echo--mbookman--180214-105456-745801
Launched job-id: echo--mbookman--180214-105456-745801
To check the status, run:
  dstat --provider local --jobs 'echo--mbookman--180214-105456-745801' --status '*'
To cancel the job, run:
  ddel --provider local --jobs 'echo--mbookman--180214-105456-745801'
Waiting for job to complete...
Waiting for: echo--mbookman--180214-105456-745801.
  echo--mbookman--180214-105456-745801: SUCCESS
echo--mbookman--180214-105456-745801

Hope that helps get you going.

freezecoder commented 6 years ago

setting TMPDIR to a writeable directory did the trick.

Many thanks for this wonderful tool.

mbookman commented 6 years ago

Re-opening this as implicit documentation and as a reminder that we should either add real documentation or look into whether there is a platform-specific code change to make.