Assume "yes" as the answer to any prompts with bioconda
2
0
Entering edit mode
7 months ago
njornet ▴ 20

I'm generating a docker container to run my program and I have to download a series of packages. Is there any flags to make bioconda assume yes, similar to "apt install -y"? Also, is there any way to install several packages in the same line or do I have to write "RUN conda install bioconda::package" in a separate line for each package?

Thank you!

docker container bioconda • 619 views
ADD COMMENT
3
Entering edit mode
7 months ago
Juke34 8.9k

From my experience using biocontainers base container no need to set yes installation is done without any command prompt, otherwise as for apt install use the flag -y it works (maybe depend the version of conda...).
So to install several tools you can do something like that to variate Chanels

# add dependencies via conda
RUN conda install -c bioconda samtools && \
         conda install -c anaconda python && \
         conda install  r-base

If you have many dependencies you can list them in a yaml file e.g. dep.yml:

name: base
channels:
  - conda-forge
  - bioconda
  - defaults
dependencies:
  - tool1
  - tool2=versionX
  - tool3

and then in your Dockerfile you do:

# copy YML dependency file
COPY dep.yml /tmp/dep.yml

# Install dependencies listed in dep.yml  file
RUN conda env update -n base --file /tmp/dep.yml
ADD COMMENT
1
Entering edit mode
7 months ago
Dave Carlson ★ 1.9k

conda install -y bioconda::packageX conda-forge::packageY should do what you're looking for.

ADD COMMENT

Login before adding your answer.

Traffic: 1957 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6