arpcard / rgi

Resistance Gene Identifier (RGI). Software to predict resistomes from protein or nucleotide data, including metagenomics data, based on homology and SNP models.
Other
330 stars 78 forks source link

Help with singularity/docker install #163

Closed ewissel closed 1 year ago

ewissel commented 3 years ago

Hey RGI devs,

I'm trying to use singularity to run RGI via docker. Here is what I've run:

singularity pull docker://finlaymaguire/rgi:latest ## runs no prob singularity run rgi_latest.sif ## in same directory

The last line returns the following error that makes me think there is a conda problem? But I'm really not familiar with singularity, so I'm not sure if this is just an issue with the way I'm using singularity. I'm trying to use singularity because I could not successfully use the conda install, used the docker install successfully in the past, and our new server requires singularity to use docker.

Should I try a different approach to using RGI with singularity?


> # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
> 
>     Traceback (most recent call last):
>       File "/opt/conda/lib/python3.8/site-packages/conda/exceptions.py", line 1079, in __call__
>         return func(*args, **kwargs)
>       File "/opt/conda/lib/python3.8/site-packages/conda/cli/main.py", line 84, in _main
>         exit_code = do_call(args, p)
>       File "/opt/conda/lib/python3.8/site-packages/conda/cli/conda_argparse.py", line 83, in do_call
>         return getattr(module, func_name)(args, parser)
>       File "/opt/conda/lib/python3.8/site-packages/conda/cli/main_run.py", line 25, in execute
>         script_caller, command_args = wrap_subprocess_call(on_win, context.root_prefix, prefix,
>       File "/opt/conda/lib/python3.8/site-packages/conda/utils.py", line 403, in wrap_subprocess_call
>         with Utf8NamedTemporaryFile(mode='w', prefix=tmp_prefix, delete=False) as fh:
>       File "/opt/conda/lib/python3.8/site-packages/conda/_vendor/auxlib/compat.py", line 81, in Utf8NamedTemporaryFile
>         return NamedTemporaryFile(mode=mode, buffering=buffering, encoding=encoding,
>       File "/opt/conda/lib/python3.8/tempfile.py", line 541, in NamedTemporaryFile
>         (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags, output_type)
>       File "/opt/conda/lib/python3.8/tempfile.py", line 250, in _mkstemp_inner
>         fd = _os.open(file, flags, 0o600)
>     OSError: [Errno 30] Read-only file system: '/opt/conda/envs/rgi/.tmpbcowwl3a'
> 
> `$ /opt/conda/bin/conda run -n rgi`
> 
>   environment variables:
>                  CIO_TEST=<not set>
>    CONDA_BACKUP_JAVA_HOME=
> CONDA_BACKUP_JAVA_LD_LIBRARY_PATH=
>         CONDA_DEFAULT_ENV=base
>                 CONDA_EXE=/home/ewissel/miniconda3/bin/conda
>              CONDA_PREFIX=/home/ewissel/miniconda3
>     CONDA_PROMPT_MODIFIER=(base)
>          CONDA_PYTHON_EXE=/home/ewissel/miniconda3/bin/python
>                CONDA_ROOT=/opt/conda
>               CONDA_SHLVL=1
>            CURL_CA_BUNDLE=<not set>
>      JAVA_LD_LIBRARY_PATH=/home/ewissel/miniconda3/jre/lib/amd64/server
>           LD_LIBRARY_PATH=/.singularity.d/libs
>                      PATH=/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin
>                           :/bin
>        REQUESTS_CA_BUNDLE=<not set>
>             SSL_CERT_FILE=<not set>
>                 USER_PATH=/home/ewissel/miniconda3/bin:/home/ewissel/miniconda3/condabin:/usr/lo
>                           cal/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/bin:/usr/bin:/sbin:
>                           /usr/sbin:/usr/local/bin:/usr/local/sbin
> 
>      active environment : /home/ewissel/miniconda3
>     active env location : /home/ewissel/miniconda3
>             shell level : 1
>        user config file : /home/ewissel/.condarc
>  populated config files : /home/ewissel/.condarc
>           conda version : 4.9.2
>     conda-build version : not installed
>          python version : 3.8.5.final.0
>        virtual packages : __glibc=2.28=0
>                           __unix=0=0
>                           __archspec=1=x86_64
>        base environment : /opt/conda  (read only)
>            channel URLs : https://conda.anaconda.org/biobakery/linux-64
>                           https://conda.anaconda.org/biobakery/noarch
>                           https://conda.anaconda.org/bioconda/linux-64
>                           https://conda.anaconda.org/bioconda/noarch
>                           https://repo.anaconda.com/pkgs/main/linux-64
>                           https://repo.anaconda.com/pkgs/main/noarch
>                           https://repo.anaconda.com/pkgs/r/linux-64
>                           https://repo.anaconda.com/pkgs/r/noarch
>                           https://conda.anaconda.org/conda-forge/linux-64
>                           https://conda.anaconda.org/conda-forge/noarch
>           package cache : /opt/conda/pkgs
>                           /home/ewissel/.conda/pkgs
>        envs directories : /home/ewissel/.conda/envs
>                           /opt/conda/envs
>                platform : linux-64
>              user-agent : conda/4.9.2 requests/2.24.0 CPython/3.8.5 Linux/4.19.0-14-amd64 debian/10 glibc/2.28
>                 UID:GID : 1000019:1000001
>              netrc file : None
>            offline mode : False
> 
> 
> An unexpected error has occurred. Conda has prepared the above report.
> 
> If submitted, this report will be used by core maintainers to improve
> future releases of conda.
> Would you like conda to send this report to the core maintainers?
> 
> [y/N]: y
> Upload successful.
> 
> Thank you for helping to improve conda.
> Opt-in to always sending reports (and not see this message again)
> by running
> 
>     $ conda config --set report_errors true
raphenya commented 3 years ago

@fmaguire Can you help me with this one? cheers.

pcrxn commented 2 years ago

I'm experiencing a similar issue after performing the following steps:

  1. Obtaining the Docker container on my local machine using docker pull finlaymaguire/rgi:latest (Docker v20.10.8).
  2. Saving the corresponding Docker image as a tarball, and building a Singularity container on my local machine (singularity-ce v3.8.4) from the Docker image with sudo permissions.
  3. Transferring the Singularity container to a destination HPC, loading the Singularity module (singularity v3.8.0-1.el7.SN.1) on the HPC, and attempting to run with singularity run -c singularity/card-rgi-5.2.0.sif rgi main.

The attached error log file rgi-main.txt was produced from running: singularity run -c card-rgi-5.2.0.sif rgi main 2> rgi-main.txt.

github-actions[bot] commented 1 year ago

Issue is stale and will be closed in 7 days unless there is new activity