NBISweden / pipelines-nextflow

A set of workflows written in Nextflow for Genome Annotation.
GNU General Public License v3.0
43 stars 18 forks source link

Conda env create fails (limited internet connection) #49

Closed ViriatoII closed 4 years ago

ViriatoII commented 4 years ago

Hello,

Due to hacker attacks to mine for cryptocoin, my university created a firewall for anything coming from internet.

When we want to install anything from conda, we need to use a special mirror. I do something like this:

conda install -c http://conda.repo.test.hhu.de/main --override-channels package_name

Now, your pipeline obviously does not account for that and it fails to connect to the regular Anaconda channel (error message bellow). Is there a way of providing my private mirror in the pipeline?

Cheers, Ricardo

` Error executing process > 'abinitio_training:split_maker_evidence (filtered)'

Caused by: Failed to create Conda environment command: conda env create --prefix /gpfs/project/new_annotation/nextflow/scratch/nxf_work/conda/agat-6b6131ed4ecf41887a64062ec60a9397 --file /home/guerrer/projects/src/nextflow/AbinitioTraining/conda/label_agat.yml status : 1 message: CondaHTTPError: HTTP 000 CONNECTION FAILED for url https://repo.anaconda.com/pkgs/main/noarch/repodata.json.bz2 Elapsed: -

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.

If your current network has https://www.anaconda.com blocked, please file
a support request with your network engineering team.

ConnectionError(MaxRetryError("HTTPSConnectionPool(host='repo.anaconda.com', port=443): Max retries exceeded with url: /pkgs/main/noarch/repodata.json.bz2 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x2b6072023b38>: Failed to establish a new connection: [Errno 101] Network is unreachable'))"))

`

ViriatoII commented 4 years ago

I tried just replacing the .yml information but it doesn't make a difference:


# conda env create -f environment.yml --override-channels
name: agat
channels:
  - http://conda.repo.test.hhu.de/main
#  - conda-forge
 # - bioconda
  #- defaults

dependencies:
  - agat=0.2.3
ViriatoII commented 4 years ago

I already have Agat installed, and the nextflow worked fine until 2 months ago (I've been with the firewall for 7 months), so this is quite frustrating :(

Why does it not use the agat environment I already have? Should I install agat in the nextflow environment?

Juke34 commented 4 years ago

FYI @mahesh-panchal and I are both in parental leave, so it can take a while before we answer you. There is a more recent version of the pipeline (which use AGAT v0.4.0). You might give a try to see if the problem persist.

ViriatoII commented 4 years ago

Thank you @Juke34 , I found the answer now! I almost got it initially, I had to edit the yml file to be like this:

# conda env create -f environment.yml 
name: agat
channels:
  - nodefaults
  - http://conda.repo.test.hhu.de/bioconda
  - http://conda.repo.test.hhu.de/main
  - http://conda.repo.test.hhu.de/conda-forge

dependencies:
  - agat=0.2.3

That -nodefaults line was what made the difference. I will also try to include agat v0.4.0 now. Btw, congrats on the kids!

Cheers, Ricardo