Size: 261
Comment:
|
Size: 5247
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
=== Conda Installation of eman-dev === 1. [[EMAN2/COMPILE_EMAN2_ANACONDA#Initial_Setup_.28one_time.29|Install Miniconda and mamba]]. 1. Run |
= EMAN2 Installation = For up-to-date binary installations you must use the instructions on this page. The old binary installation images were retired in late 2023. They are still available for historical purposes, but are no longer updated. While the binaries on this page are fine, if you [[EMAN2/Install/SourceInstall|install from source]], then you can rapidly update when we make small patches to the code. Code is being developed continuously, and binaries are built only every few months. = Install binary into Anaconda/MiniForge environment (all platforms) = 1. '''Install Anaconda or [[https://github.com/conda-forge/miniforge/releases|MiniForge]]''' (for your platform). Not necessary to repeat this step if you already have it in your account. * We suggest the open-source MiniForge to avoid licensing issues with Anaconda, but if your institution subscribes to Anaconda, that's fine too. * On M1/M2 Macs, make sure you have the ARM64 !MiniForge, not Intel. * On Windows 11 machines, the native Windows !MiniForge will not work, you must use the Linux !MiniForge within a [[https://learn.microsoft.com/en-us/windows/wsl/install|WSL2]] environment! 1. '''Update (optional):''' consider updating Anaconda/!MiniForge before installing. It's a good idea to do this periodically: {{{ conda update --all or mamba update --all }}} but consider possible impact on other conda environments you may have configured if this is not a new !MiniForge install. 1. '''Install mamba (optional):''' The default '''conda''' tool used to install packages in conda sometimes gets stuck trying to check dependencies. The alternative '''mamba''' installer does a much better job, but sometimes mamba itself can have installation issues, as it's a conda-forge package. If you have difficulties with the next step getting stuck, you may try replacing '''conda''' with '''mamba''' : {{{ conda install mamba -c conda-forge }}} 1. '''Install:''' We strongly recommend installing EMAN2 within its own !MiniForge [[https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html|environment]] like this: {{{ conda create -n eman2 eman-dev -c cryoem -c conda-forge }}} ||Current version: || {{https://anaconda.org/cryoem/eman-dev/badges/version.svg}} {{https://anaconda.org/cryoem/eman-dev/badges/latest_release_date.svg}} {{https://anaconda.org/cryoem/eman-dev/badges/downloads.svg}} || || ||{{https://anaconda.org/cryoem/eman-dev/badges/platforms.svg}}|| 1. '''Activate to Use:''' Any time you want to use EMAN2 you will need to first activate the correct environment. You can deactivate when done. {{{ conda activate eman2 }}} 1. '''M1/M2 Macs (Optional):''' initial support for Tensorflow on the GPU is available via PyPi, but not conda. {{{ # with the eman2 environment activated pip install tensorflow-metal }}} 1. '''Linux:''' see the [[#GPU|GPU]] section below. 1. Run these programs to see if the install worked: |
Line 5: | Line 45: |
mamba create -n eman-dev eman-dev -c cryoem -c conda-forge conda activate eman-dev |
# This will display the exact version you have installed. If you ask for help, provide the full output of this command. e2version.py # Relative speed factor of a single core on your computer, 2-3 typ. e2speedtest.py # Opens a browser window you can use to view any EMAN2 compatible file in various ways e2display.py # Creates a small image with a circle in the middle of it e2proc2d.py :64:64:1 test.hdf --process mask.sharp:outer_radius=24 # Displays the file you just created e2display.py test.hdf |
Line 8: | Line 56: |
<<Anchor(GPU)>> === Using NVidia GPUs === Currently, GPUs are only used for a few specific programs involving deep learning, such as tomogram annotation, particle picking and GMM variability analysis. This support is limited to Linux, and (potentially with some extra effort) Win 11 with an LSW2 installation. Many machines will have CUDA installed already, and if CUDA is an appropriate version, this should work fine with the !TensorFlow version shipped with EMAN2. However, if you are running newer versions of CUDA there may be problems. You can test compatibility quickly with: {{{ # Make sure you have your environment set to run EMAN2 programs e2version.py # The above command should work and return your current version. If it does, then run: python -c "import tensorflow" }}} If this command does not return an error, then you should be able to run deep learning software within EMAN2. If it does raise an error, then you will need to debug the problem: * If you do not have CUDA installed at all (and you are on a Linux machine with an NVidia GPU): * Installation depends on linux distribution, try your package manager for CUDA and/or CUDA-toolkit, for example, on Ubuntu: {{{ apt-get install nvidia-cuda-toolkit }}} * If the version of CUDA you have installed is incompatible, then you will need to get a compatible tensorflow installed in your conda environment. Here is one possible suggestion: {{{ conda remove tensorflow-gpu tensorflow-gpu-base pip install tensorflow # read any messages carefully, if there are errors you may need other installations }}} If you have problems you cannot figure out, feel free to post questions to the EMAN2 Google Group. |
EMAN2 Installation
For up-to-date binary installations you must use the instructions on this page. The old binary installation images were retired in late 2023. They are still available for historical purposes, but are no longer updated.
While the binaries on this page are fine, if you install from source, then you can rapidly update when we make small patches to the code. Code is being developed continuously, and binaries are built only every few months.
Install binary into Anaconda/MiniForge environment (all platforms)
Install Anaconda or MiniForge (for your platform). Not necessary to repeat this step if you already have it in your account.
We suggest the open-source MiniForge to avoid licensing issues with Anaconda, but if your institution subscribes to Anaconda, that's fine too.
On M1/M2 Macs, make sure you have the ARM64 MiniForge, not Intel.
On Windows 11 machines, the native Windows MiniForge will not work, you must use the Linux MiniForge within a WSL2 environment!
Update (optional): consider updating Anaconda/!MiniForge before installing. It's a good idea to do this periodically:
conda update --all or mamba update --all
but consider possible impact on other conda environments you may have configured if this is not a new MiniForge install.
Install mamba (optional): The default conda tool used to install packages in conda sometimes gets stuck trying to check dependencies. The alternative mamba installer does a much better job, but sometimes mamba itself can have installation issues, as it's a conda-forge package. If you have difficulties with the next step getting stuck, you may try replacing conda with mamba :
conda install mamba -c conda-forge
Install: We strongly recommend installing EMAN2 within its own MiniForge environment like this:
conda create -n eman2 eman-dev -c cryoem -c conda-forge
Current version:
Activate to Use: Any time you want to use EMAN2 you will need to first activate the correct environment. You can deactivate when done.
conda activate eman2
M1/M2 Macs (Optional): initial support for Tensorflow on the GPU is available via PyPi, but not conda.
# with the eman2 environment activated pip install tensorflow-metal
Linux: see the GPU section below.
- Run these programs to see if the install worked:
1 # This will display the exact version you have installed. If you ask for help, provide the full output of this command. 2 e2version.py 3 # Relative speed factor of a single core on your computer, 2-3 typ. 4 e2speedtest.py 5 # Opens a browser window you can use to view any EMAN2 compatible file in various ways 6 e2display.py 7 # Creates a small image with a circle in the middle of it 8 e2proc2d.py :64:64:1 test.hdf --process mask.sharp:outer_radius=24 9 # Displays the file you just created 10 e2display.py test.hdf
Using NVidia GPUs
Currently, GPUs are only used for a few specific programs involving deep learning, such as tomogram annotation, particle picking and GMM variability analysis.
This support is limited to Linux, and (potentially with some extra effort) Win 11 with an LSW2 installation.
Many machines will have CUDA installed already, and if CUDA is an appropriate version, this should work fine with the TensorFlow version shipped with EMAN2. However, if you are running newer versions of CUDA there may be problems. You can test compatibility quickly with:
# Make sure you have your environment set to run EMAN2 programs e2version.py # The above command should work and return your current version. If it does, then run: python -c "import tensorflow"
If this command does not return an error, then you should be able to run deep learning software within EMAN2. If it does raise an error, then you will need to debug the problem:
- If you do not have CUDA installed at all (and you are on a Linux machine with an NVidia GPU):
- Installation depends on linux distribution, try your package manager for CUDA and/or CUDA-toolkit, for example, on Ubuntu:
apt-get install nvidia-cuda-toolkit
- Installation depends on linux distribution, try your package manager for CUDA and/or CUDA-toolkit, for example, on Ubuntu:
- If the version of CUDA you have installed is incompatible, then you will need to get a compatible tensorflow installed in your conda environment. Here is one possible suggestion:
conda remove tensorflow-gpu tensorflow-gpu-base pip install tensorflow # read any messages carefully, if there are errors you may need other installations
If you have problems you cannot figure out, feel free to post questions to the EMAN2 Google Group.