Open-source Languages & Tools for z/OS

 View Only
  • 1.  Silent install of miniconda

    Posted 05-16-2024 09:36

    Hi,

    Is it possible to run miniconda-zos-<X.Y>-<yyyy-mm-dd>.run in "silent mode" (with a responsefile or something similar)?

    /Njål



    ------------------------------
    Njaal Sletten
    DNB
    Bergen NO
    ------------------------------


  • 2.  RE: Silent install of miniconda

    ROCKETEER
    Posted 05-17-2024 12:38
    Edited by Vladimir Kudriakov 05-17-2024 12:39

    Hello Njaal,

    Miniconda installer doesn't have such option, however it's possible to install miniconda in non-interactive way, by passing all the necessary replies to the installer via pipe. Another issue with non-interactive miniconda installation is the output of license using the command "more", that is not possible to quit by sending reply via pipe. But anyway we can suggest some solution.

    Prerequisites:

    • Current shell is bash (non-interactive miniconda installation can be run from bash only).
    • Environment variable _BPXK_AUTOCVT is defined:
      export _BPXK_AUTOCVT=ON
    • Installer file "miniconda-*.run" has the tag "IBM-1047" or doesn't have tag at all:
      chtag -tc 1047 miniconda-*.run


    Now we can run non-interactive miniconda installation:

    (more() { :; }; export -f more; printf '%s\n' y '' y '' n n | bash ./miniconda-*.run -p "installation_path")


    Some details:

    The command declares empty shell function "more()" to override the command "more" inside the miniconda installer. It allows to skip license output, but the license is saved in the file "installation_path/IBM_LICENSE.txt" and can be reviewed later.

    The command "printf '%s\n' y '' y '' n n" sends to the installer the set of predefined replies for the next installation questions:

    1. y - Installing Miniconda distribution to 'installation_path'. Continue? [Y/n];
    2. '' (two single quotes without space) - Please, press ENTER to continue (before the license output);
    3. y - Do you accept the license terms? [y/n];
    4. '' (two single quotes without space) - Please, press ENTER to continue (after the license output);
    5. n - Configure to use Rocket's secure conda server? [Y/n];
    6. n - Do you wish the installer to initialize Miniconda by running conda init? [Y/n].



    ------------------------------
    Vladimir Kudriakov
    Software Engineer
    Rocket Software
    ------------------------------



  • 3.  RE: Silent install of miniconda

    Posted 05-22-2024 02:38

    Wow, perfect!

    Thanks a lot Vladimir.

    /Njaal



    ------------------------------
    Njaal Sletten
    DNB
    Bergen NO
    ------------------------------