Skip to content

Commit 4a1a7bc

Browse files
committed
fix template
1 parent 856b37f commit 4a1a7bc

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

template/start-up.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function start_jupyter_server() {
1313
response=$(curl -s -o /dev/null -w "%{http_code}" "http://localhost:8888/api/status")
1414
done
1515

16-
cd .server/
16+
cd /.server/
1717
.venv/bin/uvicorn main:app --host 0.0.0.0 --port 49999 --workers 1 --no-access-log --no-use-colors --timeout-keep-alive 640
1818
}
1919

template/template.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,17 +104,20 @@ def make_template(
104104
.run_cmd(
105105
".server/.venv/bin/pip install --no-cache-dir -r .server/requirements.txt"
106106
)
107-
# Copy configuration files
108-
.copy("matplotlibrc", ".config/matplotlib/.matplotlibrc")
109-
.copy("start-up.sh", ".jupyter/start-up.sh", mode=0o755, user="root")
107+
)
108+
109+
if set_user_workdir:
110+
template = template.set_user("user").set_workdir("/home/user")
111+
112+
# Copy configuration files
113+
template = (
114+
template.copy("matplotlibrc", ".config/matplotlib/.matplotlibrc")
115+
.copy("start-up.sh", ".jupyter/start-up.sh")
110116
.run_cmd("chmod +x .jupyter/start-up.sh")
111117
.copy("jupyter_server_config.py", ".jupyter/")
112118
.make_dir(".ipython/profile_default/startup")
113119
.copy("ipython_kernel_config.py", ".ipython/profile_default/")
114120
.copy("startup_scripts", ".ipython/profile_default/startup")
115121
)
116122

117-
if set_user_workdir:
118-
template = template.set_user("user").set_workdir("/home/user")
119-
120123
return template.set_start_cmd(".jupyter/start-up.sh", wait_for_url("http://localhost:49999/health"))

0 commit comments

Comments
 (0)