Skip to content

Deployment Overview of Anaconda on Server

Prerequisites and Basic Requirements

The server must be running a supported Linux distribution. The deployment process differs slightly based on the package manager available on the system:

  • Debian-based distributions (e.g., Ubuntu, Debian): Requires apt package manager.
  • RHEL-based distributions (e.g., CentOS, RHEL, Rocky Linux): Requires yum or dnf package manager.
  • Privileges: The installation process requires root privileges to install system dependencies and place the Anaconda distribution in the /root directory.
  • Network Access: The server must have outbound internet access to download the installer from repo.anaconda.com and to update packages.

File and Directory Structure

The Anaconda distribution is installed in the root user's home directory. The primary components are located as follows:

  • Installation Directory: /root/anaconda3
  • Binary Executables: /root/anaconda3/bin
  • Environment Configuration: Managed via conda init which modifies shell configuration files (e.g., .bashrc or .zshrc) in the user's home directory.
  • Installer Script: Temporarily stored at /root/Anaconda3-{{ anaconda_version }}-Linux-x86_64.sh during the installation process and removed immediately after completion.

Application Installation Process

The installation is performed using the official Anaconda shell installer script. The process involves installing system dependencies, downloading the installer, executing it in batch mode, and initializing the environment.

Debian-based Systems

  1. Update and upgrade APT packages.
  2. Install the following required dependencies:
  3. libgl1-mesa-glx
  4. libegl1-mesa
  5. libxrandr2
  6. libxss1
  7. libxcursor1
  8. libxcomposite1
  9. libasound2
  10. libxi6
  11. libxtst6
  12. libxdamage1
  13. curl
  14. Download the installer to /root/Anaconda3-{{ anaconda_version }}-Linux-x86_64.sh.
  15. Verify the integrity of the installer using sha256sum.
  16. Execute the installer with the -b (batch) and -f (force) flags:
    bash /root/Anaconda3-{{ anaconda_version }}-Linux-x86_64.sh -b -f
    
  17. Initialize the distribution and update all packages:
    source /root/anaconda3/bin/activate
    conda init
    conda update --update-all -y
    
  18. Remove the installation script from /root.

RHEL-based Systems

  1. Install the following required dependencies:
  2. libXcomposite
  3. libXcursor
  4. libXi
  5. libXtst
  6. libXrandr
  7. alsa-lib
  8. mesa-libEGL
  9. libXdamage
  10. mesa-libGL
  11. libXScrnSaver
  12. Download the installer to /root/Anaconda3-{{ anaconda_version }}-Linux-x86_64.sh.
  13. Verify the integrity of the installer using sha256sum.
  14. Execute the installer with the -b (batch) and -f (force) flags:
    bash Anaconda3-{{ anaconda_version }}-Linux-x86_64.sh -b -f
    
  15. Initialize the distribution and update all packages:
    source /root/anaconda3/bin/activate
    conda init
    conda update --update-all -y
    
  16. Remove the installation script from /root.

Starting, Stopping, and Updating

Anaconda is not a system service managed by systemd or init. It is a user-space environment that is activated within a shell session.

  • Activation: To use Anaconda, the user must activate the base environment. This is typically done by sourcing the activation script:
    source /root/anaconda3/bin/activate
    
    After running conda init, the environment is automatically activated upon opening a new shell session.
  • Updating: To update the Anaconda distribution and all installed packages, run:
    conda update --update-all -y
    
  • Stopping: There is no stop command. The environment is deactivated by running:
    conda deactivate
    
    or by closing the terminal session.
question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×