bioconda / bioconda-utils

Utilities for building and managing bioconda recipes
MIT License
97 stars 133 forks source link

PermissionError: [Errno 13] Permission denied: 'docker' #989

Closed acarafat closed 6 months ago

acarafat commented 6 months ago

Hello,

I'm trying to build a recipe in a HPC using:

bioconda-utils build --docker --mulled-test --packages beav

But I'm getting the following error:

(bioconda) bash-4.2$ bioconda-utils build --docker --mulled-test --packages beav
11:38:15 BIOCONDA INFO Considering total of 1 recipes (beav).
11:38:15 BIOCONDA INFO Processing 1 recipes (beav).
11:38:15 BIOCONDA INFO Using docker image quay.io/bioconda/bioconda-utils-build-env-cos7:2.15.1 for building.
11:38:15 BIOCONDA INFO Generating DAG
Loading Recipes: 100%|████████████████████████████████████████| 1/1 [00:00<00:00, 21.96it/s]
11:38:15 BIOCONDA INFO 1 recipes to build and test:
beav
11:38:15 BIOCONDA INFO Determining expected packages for recipes/beav
WARNING: Setting build platform. This is only useful when pretending to be on another platform, such as for rendering necessary dependencies on a non-native platform. I trust that you know what you're doing.
WARNING: No numpy version specified in conda_build_config.yaml.  Falling back to default numpy value of 1.22
Adding in variants from internal_defaults
Adding in variants from /nfs7/BPP/Weisberg_Lab/lab_members/rahman/opt/conda/envs/bioconda/conda_build_config.yaml
Adding in variants from /nfs7/BPP/Weisberg_Lab/lab_members/rahman/opt/conda/envs/bioconda/lib/python3.10/site-packages/bioconda_utils/bioconda_utils-conda_build_config.yaml
defaults/noarch: 5.10MB [00:00, 24.7MB/s]                          | 0/9 [00:00<?, ?files/s]
bioconda/linux: 36.1MB [00:00, 38.2MB/s]                   | 1/9 [00:00<00:03,  2.32files/s]
defaults/osx: 46.1MB [00:01, 26.6MB/s]                     | 2/9 [00:01<00:07,  1.02s/files]
defaults/linux: 50.3MB [00:02, 19.6MB/s]                   | 3/9 [00:02<00:05,  1.03files/s]
bioconda/osx: 28.9MB [00:02, 12.5MB/s]                     | 4/9 [00:03<00:05,  1.02s/files]
conda-forge/noarch: 88.7MB [00:05, 18.6MB/s]               | 5/9 [00:05<00:04,  1.06s/files]
bioconda/noarch: 36.9MB [00:03, 12.5MB/s]████▎             | 6/9 [00:07<00:04,  1.56s/files]
conda-forge/osx: 209MB [00:09, 22.8MB/s]█████████▉         | 7/9 [00:09<00:03,  1.53s/files]
conda-forge/linux: 248MB [00:16, 16.1MB/s]████████████▍    | 8/9 [00:16<00:03,  3.32s/files]
Downloading: 100%|█████████████████████████████████████████| 9/9 [00:23<00:00,  2.65s/files]
Adding in variants from argument_variants]
Attempting to finalize metadata for beavs]
11:40:13 BIOCONDA INFO BUILD START recipes/beav
11:40:14 BIOCONDA INFO (COMMAND) docker run -t --net host --rm -v /data/tmp6oe5sx1n/build_script.bash:/opt/build_script.bash -v /nfs7/BPP/Weisberg_Lab/lab_members/rahman/opt/conda/envs/bioconda/conda-bld/:/opt/host-conda-bld -v /raid1/home/bpp/rahmaara/bioconda/bioconda-recipes/recipes/beav:/opt/recipe -e LANG=en_US.UTF-8 -e HOST_USER_ID=1724801029 quay.io/bioconda/bioconda-utils-build-env-cos7:2.15.1 /bin/bash /opt/build_script.bash

Traceback (most recent call last):
  File "/nfs7/BPP/Weisberg_Lab/lab_members/rahman/opt/conda/envs/bioconda/bin/bioconda-utils", line 10, in <module>
    sys.exit(main())
  File "/nfs7/BPP/Weisberg_Lab/lab_members/rahman/opt/conda/envs/bioconda/lib/python3.10/site-packages/bioconda_utils/cli.py", line 1124, in main
    argh.dispatch_commands([
  File "/nfs7/BPP/Weisberg_Lab/lab_members/rahman/opt/conda/envs/bioconda/lib/python3.10/site-packages/argh/dispatching.py", line 510, in dispatch_commands
    dispatch(parser, *args, **kwargs)
  File "/nfs7/BPP/Weisberg_Lab/lab_members/rahman/opt/conda/envs/bioconda/lib/python3.10/site-packages/argh/dispatching.py", line 198, in dispatch
    return run_endpoint_function(
  File "/nfs7/BPP/Weisberg_Lab/lab_members/rahman/opt/conda/envs/bioconda/lib/python3.10/site-packages/argh/dispatching.py", line 269, in run_endpoint_function
    return _process_command_output(lines, output_file, raw_output, always_flush)
  File "/nfs7/BPP/Weisberg_Lab/lab_members/rahman/opt/conda/envs/bioconda/lib/python3.10/site-packages/argh/dispatching.py", line 289, in _process_command_output
    for line in lines:
  File "/nfs7/BPP/Weisberg_Lab/lab_members/rahman/opt/conda/envs/bioconda/lib/python3.10/site-packages/argh/dispatching.py", line 414, in _execute_command
    for line in result:
  File "/nfs7/BPP/Weisberg_Lab/lab_members/rahman/opt/conda/envs/bioconda/lib/python3.10/site-packages/argh/dispatching.py", line 394, in _call
    result = function(*positional_values, **values_by_name)
  File "<boltons.funcutils.FunctionBuilder-5>", line 2, in build
  File "/nfs7/BPP/Weisberg_Lab/lab_members/rahman/opt/conda/envs/bioconda/lib/python3.10/site-packages/bioconda_utils/cli.py", line 137, in wrapper
    func(*args, **kwargs)
  File "<boltons.funcutils.FunctionBuilder-4>", line 2, in build
  File "/nfs7/BPP/Weisberg_Lab/lab_members/rahman/opt/conda/envs/bioconda/lib/python3.10/site-packages/bioconda_utils/cli.py", line 66, in wrapper
    func(*args, **kwargs)
  File "/nfs7/BPP/Weisberg_Lab/lab_members/rahman/opt/conda/envs/bioconda/lib/python3.10/site-packages/bioconda_utils/cli.py", line 498, in build
    success = build_recipes(recipe_folder, config, recipes,
  File "/nfs7/BPP/Weisberg_Lab/lab_members/rahman/opt/conda/envs/bioconda/lib/python3.10/site-packages/bioconda_utils/build.py", line 451, in build_recipes
    res = build(recipe=recipe,
  File "/nfs7/BPP/Weisberg_Lab/lab_members/rahman/opt/conda/envs/bioconda/lib/python3.10/site-packages/bioconda_utils/build.py", line 137, in build
    docker_builder.build_recipe(recipe_dir=os.path.abspath(recipe),
  File "/nfs7/BPP/Weisberg_Lab/lab_members/rahman/opt/conda/envs/bioconda/lib/python3.10/site-packages/bioconda_utils/docker_utils.py", line 483, in build_recipe
    p = utils.run(cmd, mask=False, live=live_logs)
  File "/nfs7/BPP/Weisberg_Lab/lab_members/rahman/opt/conda/envs/bioconda/lib/python3.10/site-packages/bioconda_utils/utils.py", line 629, in run
    with sp.Popen(cmds, stdout=sp.PIPE, stderr=sp.PIPE,
  File "/nfs7/BPP/Weisberg_Lab/lab_members/rahman/opt/conda/envs/bioconda/lib/python3.10/subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/nfs7/BPP/Weisberg_Lab/lab_members/rahman/opt/conda/envs/bioconda/lib/python3.10/subprocess.py", line 1863, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: 'docker'

Any insight will be appreciated. Thanks!

daler commented 6 months ago

Typically, docker needs root access, so it may not be usable as a regular user on an HPC system.

You can try excluding the --docker and --mulled-test arguments.

acarafat commented 6 months ago

Thank you, it worked!

Typically, docker needs root access, so it may not be usable as a regular user on an HPC system.

You can try excluding the --docker and --mulled-test arguments.