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!
2 answers
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
conda install -y bioconda::packageX conda-forge::packageY should do what you're looking for.
Log in to answer this question.