Skip to content

Commit dafab5d

Browse files
Added minimal description on how to run things.
1 parent 9031c2d commit dafab5d

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

examples/SOLEIL_examples/HOWTO.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Instructions for how to run SOLEIL examples.
2+
3+
## Install pyAML
4+
5+
1. Create a virtual environment and activate it. You need to have Python 3.11+.
6+
7+
2. Install pyAML including the tango-pyaml EPICS bindings.
8+
9+
```bash
10+
pip install accelerator-middle-layer[tango-pyaml]
11+
```
12+
13+
## Start the SOLEIL II virtual accelerator
14+
15+
1. Install [Apptainer](https://apptainer.org/docs/admin/main/installation.html) in case you don't already have it.
16+
17+
For the live control mode, you should have some control system emulation runing. It is possible to do
18+
```
19+
apptainer pull virtual-accelerator.sif oras://gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/apptainer/virtual-accelerator:latest
20+
apptainer run virtual-accelerator.sif
21+
```
22+
23+
***Keep this terminal running and don't do anything else in it.*** The virtual accelerator will run there and you will be able to interact with it from other terminals, jupyter notebooks, IDEs etc over the network. If you want to put it in the background, using something like tmux would be a good option.
24+
25+
this will run SOLEIL II proof-of-concept digital twin on localhost:11000. You can play with the digital twin itself (without pyAML) via jive to check that everything is working. You can run jive in a different terminal with
26+
```
27+
apptainer pull jive.sif https://gitlab.synchrotron-soleil.fr/api/v4/projects/2739/packages/generic/jive/latest/jive.sif
28+
apptainer run jive.sif
29+
```
30+
On linux you may need additionally to configure X11
31+
```
32+
export DISPLAY=:0
33+
xhost +local:root
34+
```
35+
36+
NOTE: This is just a demonstration of pyAML functionality. Certain things may be done stupidly. The person who wrote this jupyter notebook only cared about showing that the code is working, not about intelligently controlling the accelerator.
37+
38+
39+
## Run the examples
40+
41+
There are three jupyter notebook available with some basic examples. Feel free to play around and modify them. A .yaml configuration file is already provided, it was generated procedurally from the .m lattice file and nomenclature description file.

0 commit comments

Comments
 (0)