Skip to content

Commit a3df240

Browse files
committed
Images building and working locally
1 parent 6d2701c commit a3df240

File tree

11 files changed

+75
-38
lines changed

11 files changed

+75
-38
lines changed

compose/gui/docker-compose.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,25 @@ services:
66
qs-gui:
77
image: nbs_gui:latest
88
volumes:
9-
- /run/user/${HOST_UID}/${WAYLAND_DISPLAY}:/tmp/${WAYLAND_DISPLAY}
9+
- /run/user/${HOST_UID}:/run/user/${HOST_UID}
1010
- ${NBS_PODS_DIR}/config/bluesky:/etc/bluesky
1111
- ${BEAMLINE_PODS_DIR}/config/ipython:/usr/local/share/ipython
1212
- ${NBS_PODS_DIR}/config/tiled:/etc/tiled
13-
13+
devices:
14+
- /dev/dri:/dev/dri
15+
- /dev/video0:/dev/video0
1416
environment:
1517
- WAYLAND_DISPLAY=${WAYLAND_DISPLAY}
1618
- QT_QPA_PLATFORM=wayland
1719
- IPYTHONDIR=/usr/local/share/ipython
18-
- XDG_RUNTIME_DIR=/tmp
20+
- XDG_RUNTIME_DIR=/run/user/${HOST_UID}
1921
- EPICS_CA_AUTO_ADDR_LIST=YES
2022
- QSERVER_ZMQ_INFO_ADDRESS=tcp://acq_qs:60625
2123
- QSERVER_ZMQ_CONTROL_ADDRESS=tcp://acq_qs:60615
22-
command: nbs-gui --profile default
24+
command: >
25+
bash -c "
26+
tail -f /dev/null
27+
nbs-gui --profile default
28+
"
2329
networks:
2430
- bluesky-services_bluesky

compose/queueserver/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ networks:
66

77
services:
88
acq_qs:
9-
image: ghcr.io/xraygui/nbs:latest
9+
image: nbs:latest
1010
volumes:
1111
- ${BEAMLINE_PODS_DIR}/config/ipython:/usr/local/share/ipython
1212
environment:
1313
- IPYTHONDIR=/usr/local/share/ipython
1414
- EPICS_CA_AUTO_ADDR_LIST=yes
15-
command: start-re-manager --kafka-topic=nbs.bluesky.runengine.documents --kafka-server=kafka:29092 --keep-re --redis-addr redis:6379 --zmq-publish-console ON --use-ipython-kernel ON --ipython-kernel-ip auto --startup-profile default
15+
command: start-re-manager --keep-re --redis-addr redis:6379 --zmq-publish-console ON --use-ipython-kernel ON --ipython-kernel-ip auto --startup-profile default
1616
networks:
1717
- bluesky-services_bluesky

config/ipython/profile_default/startup/00-startup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
load_and_configure_everything()
66

77
nslsii.configure_base(
8-
get_ipython().user_ns, "nbs", publish_documents_with_kafka=False, bec=False
8+
get_ipython().user_ns,
9+
"nbs",
10+
publish_documents_with_kafka=True,
11+
bec=False,
12+
pbar=False,
913
)
1014

1115

config/ipython/profile_default/startup/devices.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ prefix = "NBS_SIM:sc:"
2525
name = "ucal_sc"
2626

2727
[en]
28-
_target = "nbs_bl.sim.EnPosFactory"
28+
_target = "sst_base.energy.EnPosFactory"
2929
_group = "source"
3030
_load_order = 2
31-
prefix = "NBS_SIM:energy:"
31+
prefix = ""
32+
#long_name = "SST Energy"
3233
name = "en"
3334

3435
[eslit]

config/ipython/profile_default/startup/gui_config.toml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,20 @@ en = {"_role" = "energy", "load_order" = 1}
2828
[loaders]
2929
"EnPosFactory" = "nbs_bl.qt.models.energy.EnergyModel"
3030
"I400SingleCh" = "nbs_gui.models.ScalarModel"
31+
"EpicsMotor" = "nbs_gui.models.MotorModel"
3132
"PrettyMotorFMBO" = "nbs_gui.models.MotorModel"
32-
"FMBHexapodMirror" = "nbs_gui.models.ManipulatorModel"
33+
"PrettyMotor" = "nbs_gui.models.MotorModel"
34+
"PrettyMotorFMBODeadband" = "nbs_gui.models.MotorModel"
35+
"PrettyMotorFMBODeadbandFlyer" = "nbs_gui.models.MotorModel"
36+
"FMBHexapodMirror" = "nbs_gui.models.MotorTupleModel"
3337
"EpicsSignalRO" = "nbs_gui.models.PVModel"
3438
"EpicsSignal" = "nbs_gui.models.PVModel"
3539
"ShutterSet" = "nbs_gui.models.GVModel"
3640
"EPS_Shutter" = "nbs_gui.models.GVModel"
37-
"ManipulatorBuilder" = "nbs_gui.models.ManipulatorModel"
41+
"ManipulatorBuilder" = "nbs_gui.models.PseudoPositionerModel"
3842
"ophScalar" = "nbs_gui.models.ScalarModel"
39-
"EpicsMotor" = "nbs_gui.models.MotorModel"
40-
"MultiMeshBuilder" = "nbs_gui.models.ManipulatorModel"
43+
"ADCBuffer" = "nbs_gui.models.ScalarModel"
44+
"MultiMeshBuilder" = "nbs_gui.models.PseudoPositionerModel"
4145

4246
[kafka]
4347
config_file = "/etc/bluesky/kafka.yml"
Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
1-
na_xas = { edge = "Na", region = [1055, 1065, 1.0, 1070, 0.2, 1080, 0.1, 1100, 0.2, 1140, 1.0] }
2-
zn_xas = { edge = "Zn", region = [1010, 1015, 0.5, 1030, 0.125, 1040, 0.2, 1060, 0.25, 1080, 1.0]}
3-
cu_xas = { edge = "Cu", region = [915, 920, 0.5, 926, 0.25, 934.5, 0.17, 947, 0.25, 954, 0.2, 960, 0.5, 980, 1]}
4-
ce_xas = { edge = "Ce", region = [855, 865, 1, 870, 0.5, 875, 0.2, 885, 0.1, 891, 0.2, 901, 0.1, 905, 0.2, 910, 0.5, 935, 1]}
5-
ni_xas = { edge = "Ni", region = [830, 840, 1, 845, 0.5, 848, 0.2, 858, 0.1, 867, 0.2, 874, 0.1, 882, 0.5, 900, 1]}
6-
co_xas = { edge = "Co", region = [755, 765, 1, 772, 0.5, 775, 0.2, 784, 0.1, 790, 0.2, 797, 0.1, 800, 0.2, 805, 0.5, 810, 1, 830, 2]}
7-
fe_xas = { edge = "Fe", region = [690, 700, 1, 704, 0.5, 707, 0.2, 715, 0.1, 719, 0.5, 725, 0.1, 730, 0.5, 760, 1]}
8-
f_xas = { edge = "F", region = [650, 700, 0.1]}
9-
mn_xas = { edge = "Mn", region = [625, 635, 0.5, 638, 0.2, 645, 0.1, 650, 0.2, 655, 0.1, 670, 0.5, 690, 1]}
10-
o_xas = { edge = "O", region = [515, 520, 0.5, 526, 0.2, 535, 0.05, 545, 0.1, 555, 0.25, 585, 0.5, 600, 1]}
11-
ti_xas = { edge = "Ti", region = [430, 450, 1, 470, 0.1, 480, 0.2, 500, 0.5, 510, 1]}
12-
n_xas = { edge = "N", region = [380, 395, 0.5, 397, 0.1, 403, 0.05, 407, 0.1, 417, 0.2, 440, 0.5, 480, 2]}
13-
c_xas = { edge = "C", region = [260, 263, 1, 284, 0.5, 292, 0.1, 300, 0.2, 310, 0.4, 320, 0.5, 350, 2]}
14-
sr_xas = { edge = "Sr", region = [245, 255, 1, 260, 0.5, 265, 0.2, 290, 0.1, 300, 0.2, 310, 0.4, 320, 1]}
15-
f_xas_test2 = {edge = "F", region = [650, 670, 1.0, 680, 0.2, 710, 0.1, 730, 0.5], name = "Long F XAS"}
1+
na_xas = { edge = "Na", region = [1055, 1.0, 1065, 0.2, 1070, 0.1, 1080, 0.2, 1100, 1.0, 1140] , name = "Na K-edge XAS"}
2+
zn_xas = { edge = "Zn", region = [1010, 0.5, 1015, 0.125, 1030, 0.2, 1040, 0.25, 1060, 1.0, 1080], name = "Zn L-edge XAS"}
3+
cu_xas = { edge = "Cu", region = [915, 0.5, 920, 0.25, 926, 0.17, 934.5, 0.25, 947, 0.2, 954, 0.5, 960, 1, 980], name = "Cu L-edge XAS"}
4+
ce_xas = { edge = "Ce", region = [855, 1, 865, 0.5, 870, 0.2, 875, 0.1, 885, 0.2, 891, 0.1, 901, 0.2, 905, 0.5, 910, 1, 935], name = "Ce M4,5 Edge XAS"}
5+
ni_xas = { edge = "Ni", region = [830, 1, 840, 0.5, 845, 0.2, 848, 0.1, 858, 0.2, 867, 0.1, 874, 0.5, 882, 1, 900], name = "Ni L-edge XAS"}
6+
co_xas = { edge = "Co", region = [755, 1, 765, 0.5, 772, 0.2, 775, 0.1, 784, 0.2, 790, 0.1, 797, 0.2, 800, 0.5, 805, 1, 810, 2, 830], name = "Co L-edge XAS"}
7+
fe_xas = { edge = "Fe", region = [690, 1, 700, 0.5, 704, 0.2, 707, 0.1, 715, 0.5, 719, 0.1, 725, 0.5, 730, 1, 760], name = "Fe L-edge XAS"}
8+
f_xas = { edge = "F", region = [650, 0.3, 680, 0.1, 705, 0.2, 720, 0.4, 730], name = "F K-edge XAS"}
9+
mn_xas = { edge = "Mn", region = [625, 0.5, 635, 0.2, 638, 0.1, 645, 0.2, 650, 0.1, 655, 0.5, 670, 1, 690], name = "Mn L-edge XAS"}
10+
o_xas = { edge = "O", region = [515, 0.5, 520, 0.2, 526, 0.05, 535, 0.1, 545, 0.25, 555, 0.5, 585, 1, 600], name = "O K-edge XAS"}
11+
v_xas = { edge = "O", region = [505, 0.2, 510, 0.1, 535, 0.2, 545, 0.3, 565], name = "V L-edge XAS"}
12+
ti_xas = { edge = "Ti", region = [430, 1, 450, 0.1, 470, 0.2, 480, 0.5, 500, 1, 510], name = "Ti L-edge XAS"}
13+
n_xas = { edge = "N", region = [380, 0.5, 395, 0.1, 397, 0.05, 403, 0.1, 407, 0.2, 417, 0.5, 440, 2, 480], name = "N K-edge XAS"}
14+
c_xas = { edge = "C", region = [260, 1, 263, 0.5, 284, 0.1, 292, 0.2, 300, 0.4, 310, 0.5, 320, 2, 350], name = "C K-edge XAS"}
15+
sr_xas = { edge = "Sr", region = [245, 1, 255, 0.5, 260, 0.2, 265, 0.1, 290, 0.2, 300, 0.4, 310, 1, 320], name = "Sr M3 Edge XAS"}
16+
mo_xas = { edge = "O", region = [220, 0.3, 225, 0.1, 240, 0.3, 250], name = "Mo M4,5 Edge XAS"}
17+
mo2_xas = { edge = "N", region = [380, 0.3, 390, 0.2, 415, 0.3, 425], name = "Mo M3 Edge XAS"}
18+
k_xas = {edge = "C", region = [275, 0.2, 295, 0.1, 310, 0.2, 320], name = "K L2,3 Edge XAS"}
19+
si_xas = {edge = "Si", region = [1820, 0.5, 1835, 0.2, 1875, 0.5, 1910], name = "Si XAS"}
20+
mg_xas = {edge = "Mg", region = [1270, 0.3, 1300, 0.2, 1340, 0.5, 1360, 1, 1380], name = "Mg XAS"}

config/ipython/profile_default/startup/sim_conf.toml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
11
[loaders]
2-
"PrettyMotor" = "caproto.ioc_examples.fake_motor_record.FakeMotor"
3-
"EpicsMotor" = "caproto.ioc_examples.fake_motor_record.FakeMotor"
4-
"ophScalar" = "nbs_sim.devices.detectors.SSTADC"
2+
"PrettyMotor" = "nbs_sim.devices.motors.FakeMotor"
3+
"EpicsMotor" = "nbs_sim.devices.motors.FakeMotor"
4+
"DeadbandEpicsMotor" = "nbs_sim.devices.motors.FakeMotor"
5+
"PrettyMotorFMBO" = "nbs_sim.devices.motors.FakeFMBOMotor"
6+
"PrettyMotorFMBODeadband" = "nbs_sim.devices.motors.FakeFMBOMotor"
7+
"PrettyMotorFMBODeadbandFlyer" = "nbs_sim.devices.motors.FakeFMBOMotor"
8+
"FlyableMotor" = "nbs_sim.devices.motors.FakeMotor"
9+
"ADCBuffer" = "nbs_sim.devices.detectors.ADCVoltage"
10+
"ophScalar" = "nbs_sim.devices.detectors.GenericDetector"
511
"EPS_Shutter" = "nbs_sim.devices.shutters.SSTShutter"
6-
"EnPosFactory" = "nbs_sim.devices.energy.SST1Energy"
712
"MultiMeshBuilder" = "nbs_sim.devices.manipulator.MultiMesh"
813
"ManipulatorBuilder" = "nbs_sim.devices.manipulator.Manipulator"
14+
"EnPosFactory" = "nbs_sim.devices.energy.SST1Energy"
15+
"energypos" = "nbs_sim.devices.energy.HAXEnergy"
16+
"QuadSlits" = "nbs_sim.devices.slits.QuadSlits"
17+
"QuadSlitsLimitFactory" = "nbs_sim.devices.slits.QuadSlitsLimitFactory"
18+
"SRSADCFactory" = "nbs_sim.devices.srs570.SRSADCFactory"
19+
"FloodGun" = "nbs_sim.devices.floodgun.HAXFloodgun"
20+
"FMBHexapodMirror" = "nbs_sim.devices.mirrors.FMBHexapodMirror"
21+
"EpicsSignalRO" = "nbs_sim.devices.signals.ConstantSignal"
22+
"EpicsSignal" = "nbs_sim.devices.signals.ConstantSignal"
923

1024
[devices]
1125
eslit = {_target = "nbs_sim.devices.slits.Slit", trans_min = 0, trans_max = 40, _group="apertures", _role="slits", user_limits=[0, 40]}

images/bluesky/Containerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ FROM fedora
22

33
RUN dnf install -y python3 python3-pip git
44
RUN pip3 install pyepics
5-
RUN pip3 install --pre databroker[all]
6-
RUN pip3 install bluesky
7-
RUN pip3 install nslsii tiled[all]
8-
RUN pip3 install git+https://github.com/bluesky/bluesky-adaptive.git@main#egg=bluesky-adaptive
9-
RUN pip3 install git+https://github.com/bluesky/bluesky-queueserver.git@main#egg=bluesky-queueserver
5+
RUN pip3 install tiled[all]==v0.1.0-b17
6+
RUN pip3 install --pre databroker[all]==v2.0.0b57
7+
RUN pip3 install bluesky==1.14.2
8+
RUN pip3 install bluesky-queueserver==0.0.22 bluesky-queueserver-api==0.0.12
9+
RUN pip3 install nslsii
10+
RUN pip3 install bluesky-adaptive

images/gui/Containerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ RUN dnf -y install qt5-qtbase-devel qt5-qtwayland
55

66
RUN pip3 install PyQt5
77

8-
RUN pip3 install bluesky_queueserver_api qtconsole
8+
RUN pip3 install qtconsole
99

1010
RUN pip3 install git+https://github.com/xraygui/livetable
1111
RUN pip3 install git+https://github.com/xraygui/nbs-gui

images/nbs/Containerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ FROM ${BASE_IMAGE}
44
RUN pip3 install git+https://github.com/xraygui/nbs-core
55
RUN pip3 install git+https://github.com/xraygui/nbs-bl
66
RUN pip3 install git+https://github.com/xraygui/nbs-sim
7+
RUN pip3 install git+https://github.com/nsls-ii-sst/sst_base
78

89
# Create configuration directories
910
RUN mkdir -p /etc/tiled/profiles

0 commit comments

Comments
 (0)