Skip to content

Commit 5a06e0d

Browse files
committed
updated as per comments
1 parent 2f56d04 commit 5a06e0d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

template/systemd/code-interpreter.service

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ Description=Code Interpreter Server
33
Documentation=https://github.com/e2b-dev/code-interpreter
44
Requires=jupyter.service
55
After=jupyter.service
6-
BindsTo=jupyter.service
6+
PartOf=jupyter.service
7+
StartLimitBurst=0
78

89
[Service]
910
Type=simple
1011
WorkingDirectory=/root/.server
1112
ExecStartPre=/root/.jupyter/jupyter-healthcheck.sh
1213
ExecStart=/root/.server/.venv/bin/uvicorn main:app --host 0.0.0.0 --port 49999 --workers 1 --no-access-log --no-use-colors --timeout-keep-alive 640
13-
Restart=always
14+
Restart=on-failure
1415
RestartSec=1
1516
StandardOutput=journal
1617
StandardError=journal

template/systemd/jupyter.service

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
[Unit]
22
Description=Jupyter Server
33
Documentation=https://jupyter-server.readthedocs.io
4+
Wants=code-interpreter.service
45

56
[Service]
67
Type=simple
78
Environment=MATPLOTLIBRC=/root/.config/matplotlib/.matplotlibrc
89
Environment=JUPYTER_CONFIG_PATH=/root/.jupyter
910
ExecStart=/usr/local/bin/jupyter server --IdentityProvider.token=""
10-
ExecStartPost=-/usr/bin/systemctl start --no-block code-interpreter
11+
ExecStartPost=-/usr/bin/systemctl reset-failed code-interpreter
1112
Restart=on-failure
1213
RestartSec=1
1314
StandardOutput=null

0 commit comments

Comments
 (0)