basic_users_guide_xces_new

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
basic_users_guide_xces_new [2025/01/24 15:06] – [Creating your own conda/mamba environment with the freva library] etormabasic_users_guide_xces_new [2025/02/12 09:42] (current) – [Creating your own conda/mamba environment with the freva library] etorma
Line 188: Line 188:
 </code> </code>
 BUT be aware that there is currently NO API to call freva functionalities within R, so it will only work as an additional R kernel, nothing more. BUT be aware that there is currently NO API to call freva functionalities within R, so it will only work as an additional R kernel, nothing more.
 +
 +===== Creating your own conda/mamba environment with the freva library =====
 +
 +If you want to use freva as a python library alongside others (e.g. in a conda environment) then you can:
 +  - install the package via pypi ''pip install freva'' or via conda/mamba ''mamba install -c conda-forge freva''
 +  - add the environment config of XCES in your script, e.g.:
 +<code python>
 +import os,sys
 +os.environ["EVALUATION_SYSTEM_CONFIG_FILE"] = "/work/bm1159/XCES/freva/evaluation_system.conf" # this is for the environment
 +os.environ["EVALUATION_SYSTEM_CONFIG_DIR"] = "/work/bm1159/XCES/freva" # this is for the environment
 +import freva
 +</code>
 +
 +<WRAP round important>
 +**NOTE**: since 2024 DKRZ does not allow access to ''default'' channels in conda [[https://legal.anaconda.com/policies/en/#terms-of-service| due to changes in Anaconda's terms of services]]. You need to make sure you will not use it or you will get an ''HTTP error'' message while trying to create an env. Options:
 +  * use flag '' --override-channels'' so it does not search default.
 +  * create ''$HOME/.condarc'' file with:
 +<code>
 +channels:
 +  - conda-forge
 +</code>
 +  * (similar to 2):
 +<code>
 +# check what is currently set
 +conda config --show channels
 +
 +# remove what you find 
 +conda config --remove channels defaults
 +
 +# add conda-forge
 +conda config --add channels conda-forge
 +</code>
 +
 +</WRAP>
  
  
 ===== Using XCES/Freva R/Python environment to locally install your own packages ===== ===== Using XCES/Freva R/Python environment to locally install your own packages =====
 +
 +<WRAP round info>
 +Not recommended! Your libraries would depend on the current Freva python/R environment that will eventually be updated and, hence, get obsolete.
 +</WRAP>
  
 xces/Freva ships with its own R and Python environment, with some basic set of libraries included already. These environments can be used out-of-the-box. To check the R/Python version please: xces/Freva ships with its own R and Python environment, with some basic set of libraries included already. These environments can be used out-of-the-box. To check the R/Python version please:
Line 258: Line 296:
  
 You can get some more information on e.g. how to build packages locally (I adapted some of the above mentioned text from there) [[https://nesi.github.io/hpc_training/lessons/maui-and-mahuika/installing-packages-locally|here]]. You can get some more information on e.g. how to build packages locally (I adapted some of the above mentioned text from there) [[https://nesi.github.io/hpc_training/lessons/maui-and-mahuika/installing-packages-locally|here]].
- 
-===== Creating your own conda/mamba environment with the freva library ===== 
- 
-If, on the other hand you want to use freva as a python library alongside others (e.g. in a conda environment) then you can: 
-  - install the package via pypi ''pip install freva'' or via conda/mamba ''mamba install -c conda-forge freva'' 
-  - add the environment config of XCES in your script, e.g.: 
-<code python> 
-import os,sys 
-os.environ["EVALUATION_SYSTEM_CONFIG_FILE"] = "/work/bm1159/XCES/freva/evaluation_system.conf" # this is for the environment 
-os.environ["EVALUATION_SYSTEM_CONFIG_DIR"] = "/work/bm1159/XCES/freva" # this is for the environment 
-import freva 
-</code> 
- 
-<WRAP round important> 
-**NOTE**: since 2024 DKRZ does not allow access to ''default'' channels in conda [[https://legal.anaconda.com/policies/en/#terms-of-service| for reasons]]. You need to make sure you will not use it or you will get an ''HTTP error'' message while trying to create an env. Options: 
-  * use flag '' --override-channels'' so it does not search default. 
-  * create '$HOME.condarc' file with: 
-<code> 
-channels: 
-  - conda-forge 
-</code> 
-  * (similar to 2): 
-<code> 
-# check what is currently set 
-conda config --show channels 
- 
-# remove what you find  
-conda config --remove channels defaults 
- 
-# add conda-forge 
-conda config --add channels conda-forge 
-</code> 
- 
-</WRAP> 
- 
- 
  
 ===== Additional info ===== ===== Additional info =====
  • basic_users_guide_xces_new.1737731171.txt.gz
  • Last modified: 2025/01/24 15:06
  • by etorma