Instalacja Conda z poziomu użytkownika

Steps to Install Miniconda3 on a Compute Cluster

Start an Interactive Mode

The command srun --pty /bin/bash starts an interactive session on the compute node.
This allows us to execute commands directly on the node.

srun --pty /bin/bash

Copy the Installation Script and Adjust the Grant Number

In the script below, replace pl0000-01 with your grant number. This ensures that the software is saved in the correct directory.

# Replace "pl0000-01" with your grant number
GRANT_ID="pl0000-01"

# Target path for installing Miniconda3
SOFT_PATH="/soft/miniconda3"

# Compute the real path where the software will be installed
REAL_PATH=$(realpath "$HOME""$GRANT_ID""/project_data")

# Target directory for the Miniconda3 installation
MINICONDA_DIR="$REAL_PATH""$SOFT_PATH"

# Create the target directory if it does not exist
mkdir -p $MINICONDA_DIR

# Download the Miniconda3 installer
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O $MINICONDA_DIR/miniconda.sh

# Run the Miniconda3 installer in non-interactive mode (-b) and force installation (-u)
bash $MINICONDA_DIR/miniconda.sh -b -u -p $MINICONDA_DIR

# Remove the installer after installation is complete
rm -rf $MINICONDA_DIR/miniconda.sh

# Initialize conda for bash shell
$MINICONDA_DIR/bin/conda init bash

Run the Installation Script

Save the above script to a file, for example, install_miniconda.sh, and then run it to install Miniconda3.

./install_miniconda.sh