Skip to content

Deployment Overview of Anaconda on Server

Prerequisites and Basic Requirements

The following requirements must be met before deploying Anaconda on the server:

  • Operating System: Debian-based (e.g., Ubuntu) or RHEL-based (e.g., CentOS, Rocky Linux) distributions.

  • Privileges: Root access or sudo privileges are required to install system dependencies and the Anaconda distribution.

  • Architecture: 64-bit Linux (x86_64).

  • Network Access: The server must have outbound internet access to download the installer from repo.anaconda.com and to update packages.

  • System Dependencies:

  • Debian/Ubuntu: libgl1-mesa-glx, libegl1-mesa, libxrandr2, libxss1, libxcursor1, libxcomposite1, libasound2, libxi6, libxtst6, libxdamage1, curl.

  • RHEL/CentOS: libXcomposite, libXcursor, libXi, libXtst, libXrandr, alsa-lib, mesa-libEGL, libXdamage, mesa-libGL, libXScrnSaver.

File and Directory Structure

Upon successful installation, the following directory structure is established:

  • Installation Root: /root/anaconda3

  • Binary Executables: /root/anaconda3/bin

  • Environment Configuration: /root/.bashrc (modified by conda init)

  • Installer Script Location: /root/Anaconda3-2024.06-1-Linux-x86_64.sh (removed post-installation)

Application Installation Process

The deployment involves downloading the official installer, verifying its integrity, and executing it in batch mode.

  1. Update System Packages:

  2. On Debian systems, update the APT cache and upgrade existing packages.

  3. On RHEL systems, ensure the package manager is ready for dependency installation.

  4. Install Dependencies:

  5. Install the required graphical and audio libraries listed in the Prerequisites section.

  6. Download the Installer:

  7. The installer is downloaded to /root/Anaconda3-2024.06-1-Linux-x86_64.sh from the official repository.

  8. The file permissions are set to u=rwx,g=r,o=r with root ownership.

  9. Verify Integrity:

  10. The SHA256 checksum of the downloaded installer is calculated to ensure file integrity.

  11. Execute Installation:

  12. The installer is run in batch mode (-b) with force reinstallation enabled (-f).

  13. Command: bash /root/Anaconda3-2024.06-1-Linux-x86_64.sh -b -f

  14. Initialize and Update:

  15. The base environment is activated.

  16. conda init is executed to configure the shell.

  17. All packages within the base environment are updated using conda update --update-all -y.

  18. Cleanup:

  19. The installation script is removed from the /root directory.

Access Rights and Security

  • User Context: The installation is performed as the root user.

  • File Permissions: The installer script is set to be executable by the owner and readable by group and others before execution.

  • Post-Installation: The installer script is deleted immediately after the process completes to reduce the attack surface.

  • Shell Configuration: The conda init command modifies the shell configuration file (typically /root/.bashrc) to automatically activate the base environment upon login.

Location of Configuration Files and Data

  • Main Configuration: Located within /root/anaconda3/etc/conda/.

  • User Configuration: Stored in /root/.condarc.

  • Environment Data: Managed within the /root/anaconda3 directory tree.

  • Shell Initialization: Modifications are applied to /root/.bashrc.

Starting, Stopping, and Updating

Anaconda is not a system service managed by systemd or init. It is a user-space environment.

  • Activation:

  • To activate the base environment in a new shell session, run:

    source /root/.bashrc
    

  • Alternatively, explicitly activate the base environment:

    source /root/anaconda3/bin/activate
    

  • Updating Packages:

  • To update all packages in the current environment:

    conda update --update-all -y
    

  • Updating the Distribution:

  • To update the conda package manager itself:

    conda update conda
    

  • Deactivation:

  • To deactivate the current environment:

    conda deactivate
    

question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×