Skip to content
Snippets Groups Projects
Commit 25a26de1 authored by Mikhail Karnevskiy's avatar Mikhail Karnevskiy
Browse files

Merge branch 'feat/update_installation' into 'master'

Feat: update installation

See merge request detectors/pycalibration!226
parents b1ca0d7a 8433c816
No related branches found
No related tags found
1 merge request!226Feat: update installation
......@@ -35,6 +35,41 @@ After installation, you should make sure that the home directory is in the PATH
4. export PATH=$HOME/.local/bin:$PATH
Installation using virtual python environment
---------------------------------------------
Create virtual environment::
module load anaconda/3
python -m venv /path/to/new/virtual/environment
source /path/to/new/virtual/environment/bin/activate
Clone from git::
cd /path/to/packages
git clone https://git.xfel.eu/gitlab/detectors/pycalibration.git
cd pycalibration
Edit path to the python environment in the bin/activate.sh file. Change::
export PATH=/home/${USER}/.local/bin:$PATH
to::
export PATH=/path/to/new/virtual/environment/bin:$PATH
Install the package::
pip install -r requirements.txt
In additional install pyDetLib package, which is required for many notebooks::
cd /path/to/packages
git clone https://git.xfel.eu/gitlab/karaboDevices/pyDetLib.git
cd pyDetLib/lib
pip install -r requirements.txt
pip install .
Development Installation
------------------------
......
source /etc/profile.d/modules.sh
module load anaconda/3
module load texlive
# export path to python environment
export PATH=/home/${USER}/.local/bin:$PATH
......@@ -6,7 +6,7 @@ python_path=$2
ipython_path=$3
jupyter_path=$4
ipcluster_path="${5}"
krb_activate_path=$6
activate_path=$6
uuid=$7
notebook=$8
detector=$9
......@@ -21,7 +21,7 @@ echo "Python path: $python_path"
echo "IPython path: $ipython_path"
echo "Jupyter path: $jupyter_path"
echo "IP-Cluster path: $ipcluster_path"
echo "Karabo activate: $krb_activate_path"
echo "Environment activate: $activate_path"
echo "IP-Cluster profile: $uuid"
echo "notebook: $notebook"
echo "detector: $detector"
......@@ -34,15 +34,7 @@ echo "job ID: $SLURM_JOB_ID"
export CAL_NOTEBOOK_NAME=$notebook
# set-up enviroment
if [ "${krb_activate_path}" != "NO_KRB_ACTIVATE" ]
then
source ${krb_activate_path}
else
source /etc/profile.d/modules.sh
module load anaconda/3
module load texlive
export PATH=/home/${USER}/.local/bin:$PATH
fi
source ${activate_path}
echo "Starting influx feeder"
./cal_influx_feeder.sh $notebook $detector $caltype > /dev/null 2>&1 &
......
......@@ -641,8 +641,8 @@ def concurrent_run(temp_path, nb, nbname, args, cparm=None, cval=None,
ipython_path, # path to ipython
jupyter_path, # path to jupyter
ipcluster_path, # path to ipcluster
# karabo activate path
karabo_activate_path if karabo_activate_path else "NO_KRB_ACTIVATE",
# python activate path
activate_path if activate_path!="" else "{}/bin/activate.sh".format(os.path.dirname(__file__)),
args.get("cluster_profile", "NO_CLUSTER"),
'"{}"'.format(base_name.upper()),
'"{}"'.format(args["detector"].upper()),
......
......@@ -12,8 +12,8 @@ ipython_path = "ipython"
# Path to use for calling Jupyter. If the environment is correctly set, simply the command
jupyter_path = "jupyter"
# Path to find the Karabo activate script at, set to an empty string if not running in a Karabo environemnt
karabo_activate_path = ""
# Path to find activate script
activate_path = ""
# Path to use for calling ipcluster. If the environment is correctly set, simply the command
ipcluster_path = "ipcluster"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment