Differences between revisions 25 and 91 (spanning 66 versions)
Revision 25 as of 2017-06-09 17:50:46
Size: 1574
Editor: TunayDurmaz
Comment:
Revision 91 as of 2019-11-01 14:27:54
Size: 6787
Editor: TunayDurmaz
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= !!! UNDER CONSTRUCTION !!! = ## page was renamed from EMAN2/COMPILE_EMAN2_ANACONDA
= Anaconda based Build, All Platforms =
These instructions are for building with '''!NumPy v1.13'''.
Line 3: Line 5:
= All platforms = EMAN2 source lives on !GitHub, downloading the source is part of the instructions below. Since EMAN2 uses Anaconda for its base environment, please follow the instructions below for a painless compile from source. If you go 'off script' you're on your own!
Line 5: Line 7:
The following instructions will work with cmake changes introduced in https://github.com/cryoem/eman2/pull/65. Note that even with a source build it may be difficult to get this working on systems with very old operating system installs. We normally try to support OS versions as much as 5-7 years old. Please report any problems.

== GPU Support ==
For features which support the GPU, please complete the source install instructions below, then follow the [[EMAN2/Install/BinaryInstallAnaconda#GPU|GPU instructions]] from the binary installation page.
Line 8: Line 13:
There are two approaches you can use for the installation. One uses 'Miniconda' and the other uses full 'Anaconda'. Miniconda is a much smaller (~30 MB) install, provides everything EMAN2 needs, and can be expanded with more packages as you like. Anaconda is a much more complete environment (~300 MB), including useful tools such as the Jupyter notebook, but will require the use of a conda environment to make EMAN2 work properly at present.
Line 9: Line 15:
 1. Download and install [[https://www.continuum.io/downloads | Anaconda2]] or [[https://conda.io/miniconda.html | Miniconda2]]. === Linux Clusters ===
The approaches below will install EMAN2 with a precompiled version of OpenMPI, which may or may not work with the batch queuing system on your cluster. If it does not work, the symptom will be that MPI parallel jobs will use only a single node, no matter how many you have allocated in your job. If this happens please see the linux cluster installations on the [[EMAN2/Install/BinaryInstallAnaconda|binary install page]]. Those instructions should also work with either of the source-based installations below.
Line 11: Line 18:
 1. Checkout EMAN2 code from [[https://github.com/cryoem/eman2 | GitHub:cryoem/eman2]]. {{{

cd <some-path-to-keep-eman2-source>
git clone https://github.com/cryoem/eman2.git
=== Miniconda2 ===
 1. Download and install '''Miniconda2-4.4.10''' for [[https://repo.continuum.io/miniconda/Miniconda2-4.4.10-Linux-x86_64.sh|Linux]] or [[https://repo.continuum.io/miniconda/Miniconda2-4.4.10-MacOSX-x86_64.sh|Mac OSX]].
  1. For existing installations install conda 4.5.
  {{{
conda install "conda>=4.5.2" -c defaults
Line 17: Line 25:
 1. Optionally, activate an existing conda environment, e.g. `source activate eman-env`. Skip this step if you don't understand this statement.  1. Make sure that you have added '''miniconda2/bin''' as the '''first element''' in your '''PATH''', and that you do not have '''LD_LIBRARY_PATH''' or '''PYTHONPATH''' set in your shell. If you need these settings for other software, you can still try to proceed, and hope they do not conflict with Miniconda. Alternatively, you may set up a shell script or alias to make these environment changes on demand when you want to use EMAN2/miniconda.
Line 19: Line 27:
 1. Install dependencies {{{
conda install eman-deps -c cryoem -c defaults -c conda-forge
}}} Listing the channels explicitly can be avoided by specifying them in <HOME>/.condarc, see conda documentation for more details, https://conda.io/docs/using/index.html.
 1. '''Install dependencies''', click [[https://github.com/cryoem/eman-deps-feedstock/blob/e8c31645c2e263efeeff232a7aa8a1e7eea65479/recipe/meta.yaml#L11-L42|here]] for conda dependencies
 {{{
conda install cmake=3.9 -c defaults
conda install eman-deps=14 -c cryoem -c defaults -c conda-forge
}}}
Line 23: Line 33:
 1. Out-of-source builds are recommended, so work in a directory outside of eman2 source (this is generally true, not EMAN2-specific). Note '''cmake''', not '''--( ccmake )--'''. CMake will automatically find the dependencies. If you want to change any of the CMake values, then use '''cmake-gui''' or '''ccmake'''. {{{  1. '''Checkout EMAN2 code''' from [[https://github.com/cryoem/eman2|GitHub:cryoem/eman2]].
 {{{
cd <path-where-you-want-eman2-source> # eg - $HOME/src
git clone https://github.com/cryoem/eman2.git
# this will create an eman2 folder containing the current source code from the master branch
}}}
Line 25: Line 40:
 1. '''Create a build directory''' (out-of-source builds are recommended).
 {{{
mkdir <build-directory> # eg- $HOME/src/eman2-build
Line 26: Line 44:
export MACOSX_DEPLOYMENT_TARGET=10.7 # only for MacOSX
cmake <some-path-to-keep-eman2-source> -DENABLE_CONDA=ON
make -j # "make" should pick the number of available processors,
make -j4 # but you may specify the number if you like
cmake <path-to-eman2-source> # - eg $HOME/src/eman2. On linux, also add -DENABLE_OPTIMIZE_MACHINE=ON
}}}
  * If conda is not found in PATH, set CONDA_PREFIX to your conda environment directory. It could be the main installation or an environment. This step most likely will be needed only if you use '''cmake-gui'''.
   * If you set CONDA_PREFIX to an environment, make sure to delete any cmake variables that cmake already found, variables like *_LIBRARY or similar, *_INCLUDE_PATH or similar.
   * Rerun cmake.

 1. '''Build EMAN2'''
 {{{
make -j
Line 33: Line 56:
 1. You may also wish to run
 {{{
make test # if everything passes you are fine, if there are failures, you are welcome to ask
make test-verbose # verbose test output to help to identify specific failures
}}}
Line 34: Line 62:
== Windows == === Anaconda2 ===

 1. Download and install '''Anaconda2-5.1.0''' for [[https://repo.continuum.io/archive/Anaconda2-5.1.0-Linux-x86_64.sh|Linux]] or [[https://repo.continuum.io/archive/Anaconda2-5.1.0-MacOSX-x86_64.sh|Mac OSX]].
  1. For existing installations install conda 4.5.
  {{{
conda install "conda>=4.5.2" -c defaults
}}}

 1. Make sure that you have added '''anaconda2/bin''' as the '''first element''' in your '''PATH''', and that you do not have '''LD_LIBRARY_PATH''' or '''PYTHONPATH''' set in your shell. If you need these settings for other software, you can still try to proceed, and hope they do not conflict with Anaconda. Alternatively, you may set up a shell script or alias to make these environment changes on demand when you want to use EMAN2/anaconda.

 1. '''Install dependencies''', click [[https://github.com/cryoem/eman-deps-feedstock/blob/e8c31645c2e263efeeff232a7aa8a1e7eea65479/recipe/meta.yaml#L11-L42|here]] for conda dependencies
 {{{
conda create -n eman-env cmake=3.9 -c defaults
conda install -n eman-env eman-deps=14 -c cryoem -c defaults -c conda-forge

source activate eman-env
}}}

 1. Note that you will need to run {{{ source activate eman-env }}} once in each shell before being able to run EMAN2 commands.

 1. '''Checkout EMAN2 code''' from [[https://github.com/cryoem/eman2|GitHub:cryoem/eman2]].
 {{{
cd <path-where-you-want-eman2-source> # eg - $HOME/src
git clone https://github.com/cryoem/eman2.git
# this will create an eman2 folder containing the current source code from the master branch
}}}

 1. '''Create a build directory''' (out-of-source builds are recommended).
 {{{
mkdir <build-directory> # eg- $HOME/src/eman2-build
cd <build-directory>
cmake <path-to-eman2-source> # - eg $HOME/src/eman2. On linux, also add -DENABLE_OPTIMIZE_MACHINE=ON
}}}
  * If conda is not found in PATH, set CONDA_PREFIX to your conda environment directory. It could be the main installation or an environment. This step most likely will be needed only if you use '''cmake-gui'''.
   * If you set CONDA_PREFIX to an environment, make sure to delete any cmake variables that cmake already found, variables like *_LIBRARY or similar, *_INCLUDE_PATH or similar.
   * Rerun cmake.

 1. '''Build EMAN2'''
 {{{
make -j
make install
}}}

 1. You may also wish to run
 {{{
make test # if everything passes you are fine, if there are failures, you are welcome to ask
make test-verbose # verbose test output to help to identify specific failures
}}}

Anaconda based Build, All Platforms

These instructions are for building with NumPy v1.13.

EMAN2 source lives on GitHub, downloading the source is part of the instructions below. Since EMAN2 uses Anaconda for its base environment, please follow the instructions below for a painless compile from source. If you go 'off script' you're on your own!

Note that even with a source build it may be difficult to get this working on systems with very old operating system installs. We normally try to support OS versions as much as 5-7 years old. Please report any problems.

GPU Support

For features which support the GPU, please complete the source install instructions below, then follow the GPU instructions from the binary installation page.

Mac OS X, Linux

There are two approaches you can use for the installation. One uses 'Miniconda' and the other uses full 'Anaconda'. Miniconda is a much smaller (~30 MB) install, provides everything EMAN2 needs, and can be expanded with more packages as you like. Anaconda is a much more complete environment (~300 MB), including useful tools such as the Jupyter notebook, but will require the use of a conda environment to make EMAN2 work properly at present.

Linux Clusters

The approaches below will install EMAN2 with a precompiled version of OpenMPI, which may or may not work with the batch queuing system on your cluster. If it does not work, the symptom will be that MPI parallel jobs will use only a single node, no matter how many you have allocated in your job. If this happens please see the linux cluster installations on the binary install page. Those instructions should also work with either of the source-based installations below.

Miniconda2

  1. Download and install Miniconda2-4.4.10 for Linux or Mac OSX.

    1. For existing installations install conda 4.5.
      conda install "conda>=4.5.2" -c defaults
  2. Make sure that you have added miniconda2/bin as the first element in your PATH, and that you do not have LD_LIBRARY_PATH or PYTHONPATH set in your shell. If you need these settings for other software, you can still try to proceed, and hope they do not conflict with Miniconda. Alternatively, you may set up a shell script or alias to make these environment changes on demand when you want to use EMAN2/miniconda.

  3. Install dependencies, click here for conda dependencies

    conda install cmake=3.9 -c defaults
    conda install eman-deps=14 -c cryoem -c defaults -c conda-forge
  4. Checkout EMAN2 code from GitHub:cryoem/eman2.

    cd <path-where-you-want-eman2-source>   # eg - $HOME/src
    git clone https://github.com/cryoem/eman2.git
    # this will create an eman2 folder containing the current source code from the master branch
  5. Create a build directory (out-of-source builds are recommended).

    mkdir <build-directory> # eg- $HOME/src/eman2-build
    cd <build-directory>
    cmake <path-to-eman2-source>   # - eg $HOME/src/eman2. On linux, also add -DENABLE_OPTIMIZE_MACHINE=ON
    • If conda is not found in PATH, set CONDA_PREFIX to your conda environment directory. It could be the main installation or an environment. This step most likely will be needed only if you use cmake-gui.

      • If you set CONDA_PREFIX to an environment, make sure to delete any cmake variables that cmake already found, variables like *_LIBRARY or similar, *_INCLUDE_PATH or similar.
      • Rerun cmake.
  6. Build EMAN2

    make -j
    make install
  7. You may also wish to run
    make test          # if everything passes you are fine, if there are failures, you are welcome to ask
    make test-verbose  # verbose test output to help to identify specific failures

Anaconda2

  1. Download and install Anaconda2-5.1.0 for Linux or Mac OSX.

    1. For existing installations install conda 4.5.
      conda install "conda>=4.5.2" -c defaults
  2. Make sure that you have added anaconda2/bin as the first element in your PATH, and that you do not have LD_LIBRARY_PATH or PYTHONPATH set in your shell. If you need these settings for other software, you can still try to proceed, and hope they do not conflict with Anaconda. Alternatively, you may set up a shell script or alias to make these environment changes on demand when you want to use EMAN2/anaconda.

  3. Install dependencies, click here for conda dependencies

    conda create -n eman-env cmake=3.9 -c defaults
    conda install -n eman-env eman-deps=14 -c cryoem -c defaults -c conda-forge
    
    source activate eman-env
  4. Note that you will need to run  source activate eman-env  once in each shell before being able to run EMAN2 commands.

  5. Checkout EMAN2 code from GitHub:cryoem/eman2.

    cd <path-where-you-want-eman2-source>   # eg - $HOME/src
    git clone https://github.com/cryoem/eman2.git
    # this will create an eman2 folder containing the current source code from the master branch
  6. Create a build directory (out-of-source builds are recommended).

    mkdir <build-directory> # eg- $HOME/src/eman2-build
    cd <build-directory>
    cmake <path-to-eman2-source>   # - eg $HOME/src/eman2. On linux, also add -DENABLE_OPTIMIZE_MACHINE=ON
    • If conda is not found in PATH, set CONDA_PREFIX to your conda environment directory. It could be the main installation or an environment. This step most likely will be needed only if you use cmake-gui.

      • If you set CONDA_PREFIX to an environment, make sure to delete any cmake variables that cmake already found, variables like *_LIBRARY or similar, *_INCLUDE_PATH or similar.
      • Rerun cmake.
  7. Build EMAN2

    make -j
    make install
  8. You may also wish to run
    make test          # if everything passes you are fine, if there are failures, you are welcome to ask
    make test-verbose  # verbose test output to help to identify specific failures

EMAN2/COMPILE_EMAN2_ANACONDA-PRE-CONDA-ENVIRONMENTS (last edited 2019-11-01 14:27:54 by TunayDurmaz)