Closed JavierYepez closed 1 year ago
source
won't survive different RUN
invocations (it only lasts a single bash session), but you can rewrite like this:
RUN wget -O Miniforge3.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
RUN bash Miniforge3.sh -b -p "${HOME}/conda"
RUN source "${HOME}/conda/etc/profile.d/conda.sh" \
&& conda activate \
&& conda install ....
Just remember to &&
-chain all your conda commands together in the same RUN
after source+activate.
Oh, I didn’t know about it. Thank you @jaimergp
Is there a way to maintain an environment active?
You would need to add the source + activate code in .bashrc or similar, and then ensure this is loaded for each bash run (even if not a login or interactive session). Usually done via conda init
but you'll need to do some debugging.
Search github for Dockerfiles that mention conda, the code search is quire good these days.
Ok, thank you
Solution to issue cannot be found in the documentation.
Issue
I'm trying to install mamba in a docker image following the steps on the README.md:
But conda is not being found:
I also tried some ideas from #359
Installed packages
Environment info