conda-forge / miniforge

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

'command not found' after running Miniforge3.sh remedied by conda init #457

Open DmitriyLeybel opened 1 year ago

DmitriyLeybel commented 1 year ago

Solution to issue cannot be found in the documentation.

Issue

Hello, I'm currently installing miniforge in a docker container. When omitting the conda init, the command not found error pops up. Oddly enough, my path contains a No such file or directory entry after the conda init is run - yet everything still works as expected.

Dockerfile:

FROM debian:bookworm-slim as main
# FROM python:3.11.3-bullseye as main

COPY environment.yml /
# WORKDIR /tmp
RUN apt-get -y update && \
    apt-get -y upgrade && \
    apt-get -y install wget && \
    wget -O Miniforge3.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" && \
    bash Miniforge3.sh -b -p "${HOME}/conda" && \
    . "${HOME}/conda/etc/profile.d/conda.sh" && \
    # apt-get -y install gfortran && \
    # conda env update --file environment.yml && \
    conda init

Without the conda init: image

With the conda init: image

Installed packages

# packages in environment at /root/conda:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
brotlipy                  0.7.0           py310h5764c6d_1005    conda-forge
bzip2                     1.0.8                h7f98852_4    conda-forge
ca-certificates           2022.12.7            ha878542_0    conda-forge
certifi                   2022.12.7          pyhd8ed1ab_0    conda-forge
cffi                      1.15.1          py310h255011f_3    conda-forge
charset-normalizer        3.1.0              pyhd8ed1ab_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
conda                     23.1.0          py310hff52083_0    conda-forge
conda-package-handling    2.0.2              pyh38be061_0    conda-forge
conda-package-streaming   0.7.0              pyhd8ed1ab_1    conda-forge
cryptography              40.0.1          py310h34c0648_0    conda-forge
idna                      3.4                pyhd8ed1ab_0    conda-forge
ld_impl_linux-64          2.40                 h41732ed_0    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc-ng                 12.2.0              h65d4601_19    conda-forge
libgomp                   12.2.0              h65d4601_19    conda-forge
libnsl                    2.0.0                h7f98852_0    conda-forge
libsqlite                 3.40.0               h753d276_0    conda-forge
libstdcxx-ng              12.2.0              h46fd767_19    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libzlib                   1.2.13               h166bdaf_4    conda-forge
ncurses                   6.3                  h27087fc_1    conda-forge
openssl                   3.1.0                h0b41bf4_0    conda-forge
pip                       23.0.1             pyhd8ed1ab_0    conda-forge
pluggy                    1.0.0              pyhd8ed1ab_5    conda-forge
pycosat                   0.6.4           py310h5764c6d_1    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pyopenssl                 23.1.1             pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
python                    3.10.10         he550d4f_0_cpython    conda-forge
python_abi                3.10                    3_cp310    conda-forge
readline                  8.2                  h8228510_1    conda-forge
requests                  2.28.2             pyhd8ed1ab_1    conda-forge
ruamel.yaml               0.17.21         py310h1fa729e_3    conda-forge
ruamel.yaml.clib          0.2.7           py310h1fa729e_1    conda-forge
setuptools                65.6.3             pyhd8ed1ab_0    conda-forge
tk                        8.6.12               h27826a3_0    conda-forge
toolz                     0.12.0             pyhd8ed1ab_0    conda-forge
tqdm                      4.65.0             pyhd8ed1ab_1    conda-forge
tzdata                    2023c                h71feb2d_0    conda-forge
urllib3                   1.26.15            pyhd8ed1ab_0    conda-forge
wheel                     0.40.0             pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge
zstandard                 0.19.0          py310hdeb6495_1    conda-forge
zstd                      1.5.2                h3eb15da_6    conda-forge
(base) root@ec40c7361360:/workspaces/AIIGS#

Environment info

active environment : base
    active env location : /root/conda
            shell level : 1
       user config file : /root/.condarc
 populated config files : /root/conda/.condarc
          conda version : 23.1.0
    conda-build version : not installed
         python version : 3.10.10.final.0
       virtual packages : __archspec=1=x86_64
                          __glibc=2.36=0
                          __linux=5.15.90.1=0
                          __unix=0=0
       base environment : /root/conda  (writable)
      conda av data dir : /root/conda/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : /root/conda/pkgs
                          /root/.conda/pkgs
       envs directories : /root/conda/envs
                          /root/.conda/envs
               platform : linux-64
             user-agent : conda/23.1.0 requests/2.28.2 CPython/3.10.10 Linux/5.15.90.1-microsoft-standard-WSL2 debian/12 glibc/2.36
                UID:GID : 0:0
             netrc file : None
           offline mode : False