diff --git a/docs/cheaha/tutorial/images/anaconda_env_migration.png b/docs/cheaha/tutorial/images/anaconda_env_migration.png new file mode 100644 index 000000000..9b94b78bf Binary files /dev/null and b/docs/cheaha/tutorial/images/anaconda_env_migration.png differ diff --git a/docs/cheaha/tutorial/images/comp_node_access.png b/docs/cheaha/tutorial/images/comp_node_access.png new file mode 100644 index 000000000..a5756484e Binary files /dev/null and b/docs/cheaha/tutorial/images/comp_node_access.png differ diff --git a/docs/cheaha/tutorial/images/conda_list_channels.png b/docs/cheaha/tutorial/images/conda_list_channels.png new file mode 100644 index 000000000..8dcf81a14 Binary files /dev/null and b/docs/cheaha/tutorial/images/conda_list_channels.png differ diff --git a/docs/cheaha/tutorial/images/conda_remove_env.png b/docs/cheaha/tutorial/images/conda_remove_env.png new file mode 100644 index 000000000..ed0f0d3e0 Binary files /dev/null and b/docs/cheaha/tutorial/images/conda_remove_env.png differ diff --git a/docs/cheaha/tutorial/images/conda_update_package.png b/docs/cheaha/tutorial/images/conda_update_package.png new file mode 100644 index 000000000..92cef37dc Binary files /dev/null and b/docs/cheaha/tutorial/images/conda_update_package.png differ diff --git a/docs/cheaha/tutorial/images/miniforge_create_env.png b/docs/cheaha/tutorial/images/miniforge_create_env.png new file mode 100644 index 000000000..5cce9f9f9 Binary files /dev/null and b/docs/cheaha/tutorial/images/miniforge_create_env.png differ diff --git a/docs/cheaha/tutorial/images/miniforge_create_env2.png b/docs/cheaha/tutorial/images/miniforge_create_env2.png new file mode 100644 index 000000000..a62f8ca39 Binary files /dev/null and b/docs/cheaha/tutorial/images/miniforge_create_env2.png differ diff --git a/docs/cheaha/tutorial/index.md b/docs/cheaha/tutorial/index.md index 4dfff74ba..32679751b 100644 --- a/docs/cheaha/tutorial/index.md +++ b/docs/cheaha/tutorial/index.md @@ -7,3 +7,4 @@ Have you encountered problems while using Anaconda on Cheaha? We have provided t Below is a list of Tutorials we currently have Using Anaconda on Cheaha; 1. Using PyTorch and TensorFlow with Anaconda on Cheaha, click [here.](../tutorial/pytorch_tensorflow.md) +1. Migrating Conda Environments using Miniforge, click [here.](../tutorial/migrate_conda_envs.md) diff --git a/docs/cheaha/tutorial/migrate_conda_envs.md b/docs/cheaha/tutorial/migrate_conda_envs.md new file mode 100644 index 000000000..2dc778eec --- /dev/null +++ b/docs/cheaha/tutorial/migrate_conda_envs.md @@ -0,0 +1,128 @@ + +# Migrating Conda Environments using Miniforge + +This tutorial will guide you through the steps necessary for migrating Conda environments originally installed with the `default`, `anaconda` or `r` channels to use the Miniforge module and the `conda-forge` or `bioconda` channels. + +## Steps for Migrating your Conda Environment + +1. **Access to Terminal:** + You will need access to a terminal (shell) on Cheaha. We encourage using a compute node on Cheaha when performing operations like this. You can access a Compute Node Terminal after creating an interactive job. Click on the highlighted part of the image below to access the terminal. + + ![Accessing the terminal from a created interactive job on Cheaha](images/comp_node_access.png) + + We encourage working on a compute node, to avoid clogging the cluster. You can find more information using and identifying nodes [here](../getting_started.md#why-you-should-avoid-running-jobs-on-login-nodes). + +1. **Load Anaconda Module:** You will need to load the Anaconda module using the `module load Anaconda3` command, in a terminal. + +1. **Activate the Original Conda Environment** + Activate the conda environment you want to migrate: + + ```bash + conda activate + + ``` + + Replace `` with the name of your existing Conda environment. As a best practice, you should use a name related to the environment's purpose. In this tutorial the environment `newtest` will be used as an example. + + ```bash + conda activate newtest + + ``` + + ![Steps to export environment](images/anaconda_env_migration.png) + +1. **Export the Environment to a .txt File:** +Export the environment to a `.txt` file, which captures the list of installed packages and their versions: + + ```bash + conda list --export > + + ``` + + Name the file as you see fit. + + ```bash + conda list --export > migrate_env.txt + + ``` + + When the file has been created, deactivate your Anaconda environment, and do a module reset using the `conda deactivate` and `module reset` commands respectively. + +1. **Load the Miniforge Module:** +The next step is to load the Miniforge module on Cheaha using the `module load Miniforge3` command. + +1. **Create a New Conda Environment:** +By default Miniforge creates a new environment using the `conda-forge` channel + + ```bash + conda create -n --file + + ``` + + The above command will read from the `migrate_env.txt` file and install the packages from the specified channels like `conda-forge` and `bioconda` channels. Replace `` with your desired environment name, you may decide to use the same name as your previous environment, or rename the environment. If you decide to rename the environment, remember to edit scripts and workflows that have that environment name. You may also need to edit your script to `Module load Miniforge3` as against using the Anaconda module. + + ```bash + conda create -n new_env --file migrate_env.txt + + ``` + + ![Creating a new environment with Miniforge](images/miniforge_create_env.png) + + After completing the above steps we will now need to update the environment using the Conda-Forge or Bioconda channels. + + ![Creating a new environment with Miniforge](images/miniforge_create_env2.png) + +1. **Activate the New Environment:** +Activate the new environment you created: + + ```bash + conda activate + + ``` + +1. **Update All Packages to Use the Conda-Forge Channel:** + + Update all packages in the environment to ensure they are installed from the `conda-forge` or `bioconda` channels: + + ```bash + conda update --all -c conda-forge -c bioconda + + ``` + + ![Updating your environment with conda-forge](images/conda_update_package.png) + + Now we have created the environment and updated the packages inside the environment, we can verify packages within our environment by following the below steps. + +1. **Check Installed Packages:** +Verify that all packages have been correctly installed using the `conda-forge` or `bioconda` channels: + + ```bash + conda list + + ``` + + Look at the "channel" column to ensure most packages are from `conda-forge` or `bioconda`. + + ![Conda list showing channels packages are gotten from](images/conda_list_channels.png) + +1. **Test the New Environment:** + + Run your scripts or workflows that depend on this environment to confirm that everything functions as expected. You may then decide to remove your old environments to free up space. + +1. **Remove the Old Environment (optional):** + + If everything works correctly with your new environment, you can remove the old environment: + + ```bash + conda env remove -n + + ``` + + You may or may not switch modules to delete the environment, but we advise you switch modules to delete environments created with the Anaconda module. + + ```bash + conda env remove -n newtest + + ``` + + ![Delete old environment installed using Anaconda channel and module](images/conda_remove_env.png) diff --git a/mkdocs.yml b/mkdocs.yml index 53b1ac8e0..35195e07f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -3,186 +3,187 @@ repo_url: https://github.com/uabrc/uabrc.github.io/ edit_uri: edit/main/docs/ theme: - name: material - search_index_only: true - custom_dir: theme - language: en - features: - - navigation.indexes - - navigation.instant - - content.code.copy - favicon: images/favicon.png - logo: images/logo.png + name: material + search_index_only: true + custom_dir: theme + language: en + features: + - navigation.indexes + - navigation.instant + - content.code.copy + favicon: images/favicon.png + logo: images/logo.png extra_css: - - stylesheets/extra.css + - stylesheets/extra.css extra_javascript: - - javascripts/mathjax.js - - https://polyfill.io/v3/polyfill.min.js?features=es6 - - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js + - javascripts/mathjax.js + - https://polyfill.io/v3/polyfill.min.js?features=es6 + - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js copyright: Copyright © 2021-2024 The University of Alabama at Birmingham.
Still stuck after reading? Email us at support@listserv.uab.edu markdown_extensions: - - admonition - - attr_list - - md_in_html - - pymdownx.arithmatex: - generic: true - - pymdownx.details - - pymdownx.highlight: - anchor_linenums: true - - pymdownx.keys - - pymdownx.superfences - - tables - - toc: - permalink: true + - admonition + - attr_list + - md_in_html + - pymdownx.arithmatex: + generic: true + - pymdownx.details + - pymdownx.highlight: + anchor_linenums: true + - pymdownx.keys + - pymdownx.superfences + - tables + - toc: + permalink: true plugins: - - search - - table-reader: - data_path: docs - - git-revision-date-localized: - type: date - strict: false - - glightbox: - # auto_caption: true - - redirects: - redirect_maps: - account_management/gitlab_researcher.md: account_management/gitlab_account.md - account_management/uab_researcher.md: account_management/cheaha_account.md - account_management/xias_guest.md: account_management/xias/guest_instructions.md - account_management/xias_sites.md: account_management/xias/pi_site_management.md - account_management/xias_users.md: account_management/xias/pi_guest_management.md - cheaha/conda.md: cheaha/software/software.md#anaconda-on-cheaha - cheaha/lmod.md: cheaha/software/modules.md - cheaha/slurm/sbatch_usage.md: cheaha/slurm/submitting_jobs.md - contributor_guide.md: contributing/contributor_guide.md - data_management/LTS/lts.md: data_management/lts/index.md - data_management/LTS/sharing.md: data_management/lts/policies.md - data_management/lts/lts.md: data_management/lts/index.md - data_management/lts/sharing.md: data_management/lts/policies.md - environment_management/anaconda_environments.md: workflow_solutions/using_anaconda.md - environment_management/containers.md: workflow_solutions/getting_containers.md - environment_management/git.md: workflow_solutions/git_collaboration.md - uab_cloud/cloud_remote_access.md: uab_cloud/remote_access.md - uab_cloud/instance_setup_basic.md: uab_cloud/tutorial/instances.md - uab_cloud/introduction.md: uab_cloud/index.md - uab_cloud/network_setup_basic.md: uab_cloud/tutorial/networks.md - uab_cloud/security_setup_basic.md: uab_cloud/tutorial/security.md - uab_cloud/volume_setup_basic.md: uab_cloud/tutorial/volumes.md - welcome/rc_days.md: education/research_computing_days/index.md - welcome/welcome.md: index.md - workflow_solutions/getting_software_with_git.md: workflow_solutions/git_collaboration.md - cheaha/open_ondemand/ood_main.md: cheaha/open_ondemand/ood_layout.md - cheaha/open_ondemand/ood_files.md: cheaha/open_ondemand/ood_layout.md - cheaha/open_ondemand/ood_jobs.md: cheaha/open_ondemand/ood_layout.md - cheaha/open_ondemand/ood_interactive.md: cheaha/open_ondemand/index.md + - search + - table-reader: + data_path: docs + - git-revision-date-localized: + type: date + strict: false + - glightbox: + # auto_caption: true + - redirects: + redirect_maps: + account_management/gitlab_researcher.md: account_management/gitlab_account.md + account_management/uab_researcher.md: account_management/cheaha_account.md + account_management/xias_guest.md: account_management/xias/guest_instructions.md + account_management/xias_sites.md: account_management/xias/pi_site_management.md + account_management/xias_users.md: account_management/xias/pi_guest_management.md + cheaha/conda.md: cheaha/software/software.md#anaconda-on-cheaha + cheaha/lmod.md: cheaha/software/modules.md + cheaha/slurm/sbatch_usage.md: cheaha/slurm/submitting_jobs.md + contributor_guide.md: contributing/contributor_guide.md + data_management/LTS/lts.md: data_management/lts/index.md + data_management/LTS/sharing.md: data_management/lts/policies.md + data_management/lts/lts.md: data_management/lts/index.md + data_management/lts/sharing.md: data_management/lts/policies.md + environment_management/anaconda_environments.md: workflow_solutions/using_anaconda.md + environment_management/containers.md: workflow_solutions/getting_containers.md + environment_management/git.md: workflow_solutions/git_collaboration.md + uab_cloud/cloud_remote_access.md: uab_cloud/remote_access.md + uab_cloud/instance_setup_basic.md: uab_cloud/tutorial/instances.md + uab_cloud/introduction.md: uab_cloud/index.md + uab_cloud/network_setup_basic.md: uab_cloud/tutorial/networks.md + uab_cloud/security_setup_basic.md: uab_cloud/tutorial/security.md + uab_cloud/volume_setup_basic.md: uab_cloud/tutorial/volumes.md + welcome/rc_days.md: education/research_computing_days/index.md + welcome/welcome.md: index.md + workflow_solutions/getting_software_with_git.md: workflow_solutions/git_collaboration.md + cheaha/open_ondemand/ood_main.md: cheaha/open_ondemand/ood_layout.md + cheaha/open_ondemand/ood_files.md: cheaha/open_ondemand/ood_layout.md + cheaha/open_ondemand/ood_jobs.md: cheaha/open_ondemand/ood_layout.md + cheaha/open_ondemand/ood_interactive.md: cheaha/open_ondemand/index.md nav: - - Home: index.md - - Account Management: - - account_management/index.md - - Cheaha Account: account_management/cheaha_account.md - - External Collaborator Accounts (XIAS): - - account_management/xias/index.md - - "For PIs - (1) Managing Projects & Sites": account_management/xias/pi_site_management.md - - "For PIs - (2) Managing Guests": account_management/xias/pi_guest_management.md - - "For Guests - Account Creation": account_management/xias/guest_instructions.md - - Gitlab Account: account_management/gitlab_account.md - - Data Management: - - Cheaha Storage: data_management/storage.md - - Storage Alternatives: data_management/alternate_storage.md - - Long Term Storage: - - data_management/lts/index.md - - Tutorial: - - data_management/lts/tutorial/index.md - - LTS and s3cmd Workflow: data_management/lts/tutorial/individual_lts_tutorial.md - - Interfacing with LTS: data_management/lts/interfaces.md - - Bucket Permissions: data_management/lts/policies.md - - UAB Core Accounts: data_management/lts/lts_cores.md - - FAQ: data_management/lts/lts_faq.md - - Transfer: - - Globus: data_management/transfer/globus.md - - RClone: data_management/transfer/rclone.md - - FileZilla: data_management/transfer/filezilla.md - - Code Storage: data_management/code_storage.md - - Workflow Solutions: - - Using the Shell: workflow_solutions/shell.md - - Using Anaconda: workflow_solutions/using_anaconda.md - - Using Workflow Managers: workflow_solutions/using_workflow_managers.md - - Using Git: workflow_solutions/git.md - - R Projects and Environments: workflow_solutions/r_environments.md - - Software Containers: workflow_solutions/getting_containers.md - - Software Collaboration with GitHub and GitLab: workflow_solutions/git_collaboration.md - - Cheaha Guide: - - Getting Started: cheaha/getting_started.md - - Tutorials: - - cheaha/tutorial/index.md - - Anaconda Environment Tutorial: cheaha/tutorial/pytorch_tensorflow.md - - Cheaha Web Portal: - - cheaha/open_ondemand/index.md - - Using the Web Portal: cheaha/open_ondemand/ood_layout.md - - HPC Desktop: cheaha/open_ondemand/hpc_desktop.md - - Jupyter: cheaha/open_ondemand/ood_jupyter.md - - RStudio: cheaha/open_ondemand/ood_rstudio.md - - MATLAB: cheaha/open_ondemand/ood_matlab.md - - Hardware: cheaha/hardware.md - - Software: - - Pre-installed Modules: cheaha/software/modules.md - - Self-Installed Software: cheaha/software/software.md - - SLURM: - - Introduction: cheaha/slurm/introduction.md - - Slurm Tutorial: cheaha/slurm/slurm_tutorial.md - - Submitting Jobs: cheaha/slurm/submitting_jobs.md - - Practical Batch Array Jobs: cheaha/slurm/practical_sbatch.md - - Managing Jobs: cheaha/slurm/job_management.md - - GPUs: cheaha/slurm/gpu.md - - Job Efficiency: cheaha/job_efficiency.md - - UAB Cloud (cloud.rc) Guide: - - uab_cloud/index.md - - Tutorial: - - uab_cloud/tutorial/index.md - - (1) Networks: uab_cloud/tutorial/networks.md - - (2) Security Policies: uab_cloud/tutorial/security.md - - (3) Instances: uab_cloud/tutorial/instances.md - - (4) Volumes (optional): uab_cloud/tutorial/volumes.md - - Remote Access: uab_cloud/remote_access.md - - Installing Software: uab_cloud/installing_software.md - - Snapshots and Images: uab_cloud/snapshots.md - - Sharing Cloud Environment: uab_cloud/sharing_cloud_environment.md - - UAB Kubernetes Guide: - - Startup: kubernetes/startup.md - - National Research Computing Cyberinfrastructure: - - national_ci/index.md - - The Open Science Grid: national_ci/osg.md - - NSF Cyberinfrastructure: national_ci/nsf_access.md - - NIH Cyberinfrastructure: national_ci/nih.md - - Grants & Contracts: - - RC Facilities Description: grants/facilities.md - - Acknowlding Us in Publications: grants/publications.md - - Funding Opportunities: grants/opportunities.md - - Outreach & Training: - - Case Studies: education/case_studies.md - - Research Computing Days: - - education/research_computing_days/index.md - - Offered Courses: education/courses.md - - Training Resources: education/training_resources.md - - Policies: policies.md - - Reporting Documentation Errors: contributing/reporting_errors.md - - Contributing Content: contributing/contributor_guide.md - - Help: - - Support: help/support.md - - FAQ - Frequently Asked Questions: help/faq.md + - Home: index.md + - Account Management: + - account_management/index.md + - Cheaha Account: account_management/cheaha_account.md + - External Collaborator Accounts (XIAS): + - account_management/xias/index.md + - "For PIs - (1) Managing Projects & Sites": account_management/xias/pi_site_management.md + - "For PIs - (2) Managing Guests": account_management/xias/pi_guest_management.md + - "For Guests - Account Creation": account_management/xias/guest_instructions.md + - Gitlab Account: account_management/gitlab_account.md + - Data Management: + - Cheaha Storage: data_management/storage.md + - Storage Alternatives: data_management/alternate_storage.md + - Long Term Storage: + - data_management/lts/index.md + - Tutorial: + - data_management/lts/tutorial/index.md + - LTS and s3cmd Workflow: data_management/lts/tutorial/individual_lts_tutorial.md + - Interfacing with LTS: data_management/lts/interfaces.md + - Bucket Permissions: data_management/lts/policies.md + - UAB Core Accounts: data_management/lts/lts_cores.md + - FAQ: data_management/lts/lts_faq.md + - Transfer: + - Globus: data_management/transfer/globus.md + - RClone: data_management/transfer/rclone.md + - FileZilla: data_management/transfer/filezilla.md + - Code Storage: data_management/code_storage.md + - Workflow Solutions: + - Using the Shell: workflow_solutions/shell.md + - Using Anaconda: workflow_solutions/using_anaconda.md + - Using Workflow Managers: workflow_solutions/using_workflow_managers.md + - Using Git: workflow_solutions/git.md + - R Projects and Environments: workflow_solutions/r_environments.md + - Software Containers: workflow_solutions/getting_containers.md + - Software Collaboration with GitHub and GitLab: workflow_solutions/git_collaboration.md + - Cheaha Guide: + - Getting Started: cheaha/getting_started.md + - Tutorials: + - cheaha/tutorial/index.md + - Anaconda Environment Tutorial: cheaha/tutorial/pytorch_tensorflow.md + - Conda Environment Migration: cheaha/tutorial/migrate_conda_envs.md + - Cheaha Web Portal: + - cheaha/open_ondemand/index.md + - Using the Web Portal: cheaha/open_ondemand/ood_layout.md + - HPC Desktop: cheaha/open_ondemand/hpc_desktop.md + - Jupyter: cheaha/open_ondemand/ood_jupyter.md + - RStudio: cheaha/open_ondemand/ood_rstudio.md + - MATLAB: cheaha/open_ondemand/ood_matlab.md + - Hardware: cheaha/hardware.md + - Software: + - Pre-installed Modules: cheaha/software/modules.md + - Self-Installed Software: cheaha/software/software.md + - SLURM: + - Introduction: cheaha/slurm/introduction.md + - Slurm Tutorial: cheaha/slurm/slurm_tutorial.md + - Submitting Jobs: cheaha/slurm/submitting_jobs.md + - Practical Batch Array Jobs: cheaha/slurm/practical_sbatch.md + - Managing Jobs: cheaha/slurm/job_management.md + - GPUs: cheaha/slurm/gpu.md + - Job Efficiency: cheaha/job_efficiency.md + - UAB Cloud (cloud.rc) Guide: + - uab_cloud/index.md + - Tutorial: + - uab_cloud/tutorial/index.md + - (1) Networks: uab_cloud/tutorial/networks.md + - (2) Security Policies: uab_cloud/tutorial/security.md + - (3) Instances: uab_cloud/tutorial/instances.md + - (4) Volumes (optional): uab_cloud/tutorial/volumes.md + - Remote Access: uab_cloud/remote_access.md + - Installing Software: uab_cloud/installing_software.md + - Snapshots and Images: uab_cloud/snapshots.md + - Sharing Cloud Environment: uab_cloud/sharing_cloud_environment.md + - UAB Kubernetes Guide: + - Startup: kubernetes/startup.md + - National Research Computing Cyberinfrastructure: + - national_ci/index.md + - The Open Science Grid: national_ci/osg.md + - NSF Cyberinfrastructure: national_ci/nsf_access.md + - NIH Cyberinfrastructure: national_ci/nih.md + - Grants & Contracts: + - RC Facilities Description: grants/facilities.md + - Acknowlding Us in Publications: grants/publications.md + - Funding Opportunities: grants/opportunities.md + - Outreach & Training: + - Case Studies: education/case_studies.md + - Research Computing Days: + - education/research_computing_days/index.md + - Offered Courses: education/courses.md + - Training Resources: education/training_resources.md + - Policies: policies.md + - Reporting Documentation Errors: contributing/reporting_errors.md + - Contributing Content: contributing/contributor_guide.md + - Help: + - Support: help/support.md + - FAQ - Frequently Asked Questions: help/faq.md validation: - nav: - omitted_files: warn - not_found: warn - absolute_links: warn - links: - not_found: warn - anchors: warn - absolute_links: warn - unrecognized_links: warn + nav: + omitted_files: warn + not_found: warn + absolute_links: warn + links: + not_found: warn + anchors: warn + absolute_links: warn + unrecognized_links: warn