Back to home page

EIC code displayed by LXR

 
 

    


Warning, /edpm/pip_readme.md is written in an unsupported language. File is not indexed.

0001 # edpm
0002 
0003 **edpm** stands for **E**IC **d**evelopment  **p**acket ~~**m**anager~~ helper
0004 
0005 **The goal** of edpm is to provide esier experience of building EIC simulation and reconstruction 
0006 framework and supporting packages on a user machine with development reasons. 
0007 
0008 ***TL;DR;*** example for CentOS/RHEL7
0009 ```bash
0010 
0011 # INSTALL PREREQUESTIES
0012 edpm req centos eicrecon         # get list of OS packets required to build jana and deps
0013 sudo yum install ...          # install watever 'edpm req' shows
0014 
0015 # or if you are a lucky bash user (yes, csh is still common in physics):
0016 sudo yum install $(edpm req centos eicrecon --all) 
0017 
0018 # SETUP edpm
0019 edpm --top-dir=<where-to>   # Directory where packets will be installed
0020 edpm set root `$ROOTSYS`    # (optional) if you have CERN.ROOT or other monster packets: 
0021 
0022 # INSTALL PACKETS
0023 edpm install eicrecon          # install eicrecon and dependencies (like genfit, jana and rave)
0024 edpm install g4e            # install 'Geant 4 EIC' and dependencies (like vgm, hepmc)
0025 
0026 # SET RIGHT ENVIRONMENT 
0027 source<$(edpm env)          # set environment variables, 
0028 source ~/.local/share/edpm/env.sh  # more convenient way. Use *.csh file for tcsh
0029 ```
0030 
0031 
0032 ### Motivation
0033 
0034 **edpm** is here as there is no standard convention in HEP and NP of how to distribute and install software packages 
0035 with its dependencies. Some packages (like eigen, xerces, etc.) are usually supported by 
0036 OS maintainers, while others (Cern ROOT, Geant4, Rave) are usually built by users or 
0037 other packet managers and could be located anywhere. Here comes "version hell" multiplied by lack of software manpower 
0038 (e.g. to continuously maintain packages on distros level or even to fix GitHub issues) 
0039 Still we love our users and try to get things easier for them!
0040 So here is edpm.
0041 
0042 
0043 At this points **edpm** tries to unify experience and make it simple to deploy e^JANA for:
0044 
0045 - Users on RHEL 7, 8 and CentOS
0046 - Users on Ubutnu/Debian (and Windows with WSL) \*\*
0047 - Docker and other containers
0048 
0049 
0050 It should be as easy as ```> edpm install eicrecon``` to build and install a packet called 'eicrecon'
0051  and its dependencies. But it should also provide a possibility to adopt existing installations
0052   and have a fine control over dependencies: ```> edpm set root /opt/root6_04_16```
0053 
0054 **edpm** is not: 
0055 
0056 1. It is not a **real** package manager, which automatically solves dependencies, 
0057 download binaries (working with GPG keys, etc.), finds fastest mirrors, manage... etc. 
0058 2. **edpm is not a requirment** for e<sup>JANA</sup>. It is not a part of e<sup>JANA</sup> 
0059     build system and one can compile and install e<sup>JANA</sup> without edpm   
0060 
0061 
0062 ## Get eicrecon installed
0063 
0064 Step by step explained instruction:
0065 
0066 1. **Install prerequisites** utilizing OS packet manager:
0067 
0068     ```bash
0069     # To see the prerequesties
0070     edpm req ubuntu         # for all packets that edpm knows
0071     edpm req centos eicrecon   # for eicrecon and its dependencies only
0072     
0073     # To put everything into packet manager 
0074     apt-get -y install `edpm req ubuntu --all`   # debian
0075     yum -y install `edpm req centos --all`       # centos/centos    
0076     ```
0077     
0078     At this point only ***'ubuntu'*** and ***'centos'*** are known words for req command. Put: 
0079     * ***ubuntu*** for debian family 
0080     * ***centos*** for RHEL and CentOS systems.
0081 
0082     *In the future this will be updated to support macOS and to have more detailed versions*
0083 
0084 2. **Set top-dir**. This is where all missing packets will be installed.   
0085 
0086     ```bash
0087     edpm --top-dir=<where-to-install-all>
0088     ```
0089    
0090 3. **Register installed packets**. You may have CERN.ROOT installed (req. version >= 6.14.00). Run this:
0091     ```bash
0092     edpm set root `$ROOTSYS` 
0093     ```
0094    
0095    You may set paths for other installed dependencies combining:  
0096    ```bash
0097    edpm install eicrecon --missing --explain    # to see missing dependencies
0098    edpm set <name> <path>                    # to set dependency path
0099    ```
0100    
0101    Or you may skip this step and just get everything installed by edpm
0102    
0103 4. **Install eicrecon** and all missing dependencies:
0104 
0105     ```bash
0106     edpm install eicrecon
0107     ```
0108 
0109 5. **Set environment**. There are 3 ways for doing this this: 
0110     
0111     1. Dynamically source output of ```edpm env``` command (recommended)
0112     
0113         ```bash        
0114         source <(edpm env)                # works for bash only
0115         ```
0116     2. Save output of ```edpm env``` command to a file (can be useful)
0117     
0118         ```bash
0119          edpm env sh  > your-file.sh       # get environment for bash or compatible shells
0120          edpm env csh > your-file.csh      # get environment for CSH/TCSH
0121         ```
0122     3. Use edpm generated ```env.sh``` and ```env.csh``` files (lazy and convenient)
0123     
0124         ```bash        
0125         $HOME/.local/share/edpm/env.sh    # bash and compatible
0126         $HOME/.local/share/edpm/env.csh   # for CSH/TCSH
0127         ```
0128         (!) The files are regenerated each time ```edpm <command>``` changes something in edpm.
0129         If you change ```db.json``` by yourself, edpm doesn't track it automatically, so call 'edpm env'
0130         to regenerate these 2 files
0131     
0132 
0133 ## Environment
0134 
0135  ```edpm_DATA_PATH```- sets the path where the configuration db.json and env.sh, env.csh are located
0136 
0137 
0138 Each time you make changes to packets, 
0139 edpm generates `env.sh` and `env.csh` files, 
0140 that could be found in standard apps user directory.
0141 
0142 For linux it is in XDG_DATA_HOME:
0143 
0144 ```
0145 ~/.local/share/edpm/env.sh      # sh version
0146 ~/.local/share/edpm/env.csh     # csh version
0147 ~/.local/share/edpm/db.json     # open it, edit it, love it
0148 ```
0149 
0150 > XDG is the standard POSIX paths to store applications data, configs, etc. 
0151 edpm uses [XDG_DATA_HOME](https://wiki.archlinux.org/index.php/XDG_Base_Directory#Specification)
0152 to store `env.sh`, `env.csh` and `db.json` and ```db.json```
0153 
0154 You can always get fresh environment with edpm ```env``` command 
0155 ```bash
0156 edpm env
0157 ```
0158 
0159 You can directly source it like:
0160 ```bash
0161 source<(edpm env)
0162 ```
0163 
0164 You can control where edpm stores data by setting ```edpm_DATA_PATH``` environment variable.
0165 
0166 
0167 <br><br>
0168