Skip to content

Commit

Permalink
move unit, fix options, remove packagegroup
Browse files Browse the repository at this point in the history
This hopefully should be the last step to getting everything working and
sane. We don't need the packagegroup (something was breaking everything
anyway) and we need to fix up a couple things in the install process so
the unit goes in the same place as everything else, actually runs
jupyter directly so journald logging tags it properly, and we get the
user package path.
  • Loading branch information
sfoster1 committed Jan 31, 2024
1 parent 0349f6f commit f1704f2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 35 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ IMAGE_INSTALL += " \
python3-pip \
plymouth \
mosquitto \
opentrons-jupyter-notebook python3-nest-asyncio \
opentrons-jupyter-notebook \
"

# We do NOT want the toradex libusbgx packages that autoconfigure the OTG USB
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ Description=Jupyter notebook server
Type=simple
Restart=always
RestartSec=1
ExecStart=/bin/sh -c "jupyter notebook --allow-root --config=%E/jupyter/jupyter_notebook_config.py --notebook-dir=%S/jupyter/notebooks 2>&1"
ExecStart=/usr/bin/jupyter notebook --allow-root --config=%E/jupyter/jupyter_notebook_config.py --notebook-dir=%S/jupyter/notebooks
PIDFile=%t/jupyter/jupyter.pid
SupplementaryGroups=dialout
StateDirectory=jupyter jupyter/notebooks jupyter/data jupyter/config ipython
RuntimeDirectory=jupyter
Environment=RUNNING_ON_VERDIN=true
Environment=OT_SYSTEM_VERSION=##OT_SYSTEM_VERSION##
Environment=OT_API_FF_enableOT3HardwareController=true
Environment=PYTHONPATH=/opt/opentrons-robot-server:/usr/lib/python3.10/site-packages
Environment=PYTHONPATH=/opt/opentrons-robot-server/:/usr/lib/python3.10/site-packages/:/var/user-packages/usr/lib/python3.10/site-packages/
Environment=JUPYTER_RUNTIME_DIR=%t/jupyter
Environment=JUPYTER_CONFIG_DIR=%S/jupyter/config
Environment=JUPYTER_DATA_DIR=%S/jupyter/data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,15 @@ SRC_URI += "file://jupyter_notebook_config.py \

do_install:append() {
install -d ${D}/${sysconfdir}/jupyter
install -d ${D}/${sysconfdir}/systemd/system
install -m 644 ${WORKDIR}/jupyter_notebook_config.py ${D}/${sysconfdir}/jupyter/jupyter_notebook_config.py
install -m 644 ${WORKDIR}/jupyter-notebook.service ${D}/${sysconfdir}/systemd/system/jupyter-notebook.service

# set the system version env variable
sed -i 's/##OT_SYSTEM_VERSION##/${OT_SYSTEM_VERSION}/' ${D}/${sysconfdir}/systemd/system/jupyter-notebook.service
install -d ${D}${systemd_system_unitdir}
install -m 644 ${WORKDIR}/jupyter-notebook.service ${D}${systemd_system_unitdir}/jupyter-notebook.service
# set the system version env variable
sed -i 's/##OT_SYSTEM_VERSION##/${OT_SYSTEM_VERSION}/' ${D}/${systemd_system_unitdir}/jupyter-notebook.service
}

FILES:${PN} += "${sysconfdir}/jupyter/jupyter_notebook_config.py \
${sysconfdir}/systemd/system/jupyter-notebook.service \
"

RDEPENDS:${PN} += " python3-jupyter python3-nbclient python3-jupyterlab-pygments python3-psutil "
RDEPENDS:${PN} += " python3-jupyter python3-nbclient python3-jupyterlab-pygments python3-psutil python3-nest-asyncio "

0 comments on commit f1704f2

Please sign in to comment.