Copy a Conda environment from one computer to another

gene_x 0 like s 138 view s

Tags: pipeline

1, Export the Conda Environment

On the original computer, you can export the environment to a YAML file. This file will contain all the necessary details about the environment, including the packages and versions.

Open a terminal and activate the environment you want to copy:

    conda activate bengal3_ac3
    conda env export > bengal3_ac3.yml
    conda activate spandx
    conda env export > spandx.yml
    conda activate chipseq
    conda env export > chipseq.yml
    conda activate rnaseq
    conda env export > rnaseq.yml
    conda activate homer
    conda env export > homer.yml
    conda activate qiime1
    conda env export > qiime1.yml
    conda activate trycycler
    conda env export > trycycler.yml
    conda activate vrap
    conda env export > vrap.yml
    #--------
    conda activate chipseq2
    conda env export > chipseq2.yml
    conda activate r
    conda env export > r.yml
    conda activate rnaseq_2021
    conda env export > rnaseq_2021.yml
    conda activate rnaseq_old
    conda env export > rnaseq_old.yml
    conda activate snippy_env
    conda env export > snippy_env.yml
    conda activate spandx2
    conda env export > spandx2.yml
    #--------
    conda activate rnaseq
    conda env export > rnaseq_sage.yml
    conda activate rnaseq2
    conda env export > rnaseq2_sage.yml
    #--------
    TODO: export the yml files from notebook

2, Transfer the YAML File

Copy the environment.yml file from the original computer to the new computer. You can use methods such as USB drives, cloud storage, or direct file transfer over the network (e.g., using SCP if both machines are accessible over a network):

    rsync -a -P jhuang@hamm:/home/jhuang/*.yml ./

3, Create the Environment on the New Computer

    conda env create -f bengal3_ac3.yml
    conda env create -f spandx.yml
    #or conda env update --name spandx --file spandx.yml
    conda env create -f chipseq.yml
    conda env create -f rnaseq.yml
    conda env create -f homer.yml
    conda env create -f qiime1.yml
    conda env create -f trycycler.yml
    conda env create -f vrap.yml

    # -- for viral variant calling
    /home/jhuang/Tools/viral-ngs/bin/easy-deploy-script/viral-ngs-etc/conda-env
    viral-ngs
    # -- The results can be confirmed by the bacterial variant calling pipelines
    spandx
    bengal3_ac3  # for the env, we need snakemake_4_3_1.
        conda update -n base conda
        conda create -n snakemake_4_3_1 snakemake=4.3.1
        /home/jhuang/miniconda3/envs/snakemake_4_3_1/bin/snakemake --printshellcmds

like unlike

点赞本文的读者

还没有人对此文章表态


本文有评论

没有评论

看文章,发评论,不要沉默


© 2023 XGenes.com Impressum