Skip to content
Snippets Groups Projects
local_install.rst 3.17 KiB
Newer Older
  • Learn to ignore specific revisions
  • Dmitry Romanov's avatar
    Dmitry Romanov committed
    Local installation
    ==================
    
    ***(!)Warning(!)*** - local installation is for expert users only! 
    There are many possible pitfalls why some parts of the software might not be installed, give compilation errors, etc. 
    Then it require some spack-kung-foo to debug and recover the installation. Finally you may end up with different
    options compiled (like QT support for Geant4) so your installation (or even simulation results!) are different than in production. 
    
    We release container images exactly to avoid all the problems above. So if you don't want to struggle use them. But if you want...
    
    Spack
    -----
    
    
    Install spack
    .............
    
    Spack is a package management tool designed to support multiple versions
    and configurations of software on a wide variety of platforms and
    environments. Spack allows to automatically build target packages with
    all needed dependencies. `Sapck
    documentation <https://spack.readthedocs.io/en/latest/getting_started.html#installation>`__
    
    The installation consist of 3 steps then: 1. Install spack itself 2.
    Install  `eic-spack repository <https://github.com/eic/eic-spack>`__ (with EIC
    packages) 3. Run spack command to install athena packages (like npdet)
    
    To install spack and EIC repository:
    
    .. code:: bash
    
        git clone https://github.com/spack/spack.git
    
        #Source environment
    
        # For bash/zsh users
        $ . spack/share/spack/setup-env.sh
    
        # For tcsh/csh users
        $ source spack/share/spack/setup-env.csh
    
    You should be able now to use spack:
    
    .. code:: bash
    
        spack info root
    
    (!) By default, all packages will be downloaded, built and installed in this spack directory
    
    `More documentation on spack installation <https://spack.readthedocs.io/en/latest/getting_started.html#installation>`_
    
    Clone and add `eic-spack repository <https://github.com/eic/eic-spack>`_:
    
    .. code:: bash
    
        # Adding the EIC Spack Repository
        git clone https://github.com/eic/eic-spack.git
    
        # Add this repository to your Spack configuration
        spack repo add eic-spack
    
    
    Then you should be able to install ATHENA packages. The full spack environment for the stack:
    
    .. code:: yaml
    
        spack:
            specs:
                - assimp +ipo
                - acts@8.03.0 +dd4hep +digitization +examples +fatras +identification +json +tgeo
                    +ipo
                - cmake
                - clhep cxxstd=17
                - dd4hep +geant4 +hepmc3 +lcio +ipo
                - eigen
                - gaudi@34.0 +ipo
                - geant4 +ipo -qt -opengl -python +vecgeom cxxstd=17
                - genfit +ipo
                - hepmc3 +interfaces +python +rootio
                - lcio +ipo
                - nano
                - opencascade +ipo +tbb -vtk
                - podio +ipo
                - pythia8 +fastjet
                - root cxxstd=17 +fftw +fortran +gdml +mlp +pythia8 +root7 +tmva +vc +xrootd +ssl
                - singularity +suid
                - xrootd cxxstd=17 +python
                - eicd
                - npdet@master
            concretization: together
            config:
                install_missing_compilers: true
                # install_tree: /opt/software
            view: false
    
    Copy this or download `athena.yaml <athena.yaml>`_
    
    .. code:: bash
    
        spack env create athena athena.yaml
        spack env activate athena
        spack install