conda-forge / miniforge

A conda-forge distribution.
https://conda-forge.org/miniforge
Other
6.14k stars 318 forks source link

can't create a PATH for conda when I use CI pipeline #359

Closed yushikmr closed 1 year ago

yushikmr commented 1 year ago

Solution to issue cannot be found in the documentation.

Issue

Hi, I would install miniforge following the document on this repository.

I can install and create a PATH for conda command when I use this command.

But I can't create a PATH for conda when I use CI pipline.

I tried ...

wget -O Miniforge3.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
bash Miniforge3.sh -b

conda

then;

conda: command not found

how does it differ between these install methods ?

Installed packages

I can't install conda.

Environment info

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:    22.04
Codename:   jammy
hmaarrfk commented 1 year ago

Yeah. We should add commands to init and to source to our documentation. I think it gets installed in like $HOME/miniforge3 by default.

hmaarrfk commented 1 year ago

You likely need to add the lines:

source ${HOME}/mambaforge/etc/profile.d/conda.sh
source ${HOME}/mambaforge/etc/profile.d/mamba.sh
conda activate

A PR to improve the documentation would be appreciated!

yushikmr commented 1 year ago

@hmaarrfk thank you fir answering!

I finally can install miniforge by CI pipline.

I used thes commands;

wget -O Miniforge3.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
bash Miniforge3.sh -b
source ${HOME}/miniforge/etc/profile.d/conda.sh
conda activate

then;

(base) ubuntu@ip-xxxx:~$

But I have a question;

In your command, the directory name is not miniforge but mambaforge. What is mambaforge ? What are differences between miniforge and mambaforge ?

And I'll send a PR to improve the document !.

hmaarrfk commented 1 year ago

I use the mambaforge provided installers which install mamba in addition to the rest of the packages.

hmaarrfk commented 1 year ago
bash Miniforge.sh -b --prefix "${HOME}/conda"
[ -f ! "${HOME}/conda/etc/profile.d/conda.sh" ] || source "${HOME}/conda/etc/profile.d/conda.sh"
[ -f ! "${HOME}/conda/etc/profile.d/mamba.sh" ] || source "${HOME}/conda/etc/profile.d/mamba.sh"
conda activate

something like this should be pretty portable. It specifies to install Miniforge (or mambaforge) in ${HOME}/conda and will source the shell founds if found.

yushikmr commented 1 year ago

I see ! Thanks! I sent a PR #364 !.