correct way to call jupyter in template

I'm trying to learn how to create a template. I'm using FROM runpod/pytorch:2.1.1-py3.10-cuda12.1.1-devel-ubuntu22.04 as a base, which I beleive already comes with jupyter. As such I am tryign to run jupyter in my start.sh file using the command below: echo "Starting Jupyter Lab..." jupyter lab --ip 0.0.0.0 --port 8888 --allow-root --NotebookApp.token='' --NotebookApp.password='' & however, while the echo is propelry logged to the system log, unfortunately the button to access jupyter does not appear in the pod as it should. When I try to access it manually by going to podid-podport.runpod.ne i'm presented with a white page. I also checked to make sure that the port is properly exposed in the template and pod panels. What am I doing wrong?
5 Replies
ashleyk
ashleyk9mo ago
start_jupyter() {
if [[ $JUPYTER_PASSWORD ]]; then
echo "Starting Jupyter Lab..."
mkdir -p /workspace/logs
cd / && \
nohup jupyter lab --allow-root \
--no-browser \
--port=8888 \
--ip=* \
--FileContentsManager.delete_to_trash=False \
--ContentsManager.allow_hidden=True \
--ServerApp.terminado_settings='{"shell_command":["/bin/bash"]}' \
--ServerApp.token=${JUPYTER_PASSWORD} \
--ServerApp.allow_origin=* \
--ServerApp.preferred_dir=/workspace &> /workspace/logs/jupyter.log &
echo "Jupyter Lab started"
fi
}
start_jupyter() {
if [[ $JUPYTER_PASSWORD ]]; then
echo "Starting Jupyter Lab..."
mkdir -p /workspace/logs
cd / && \
nohup jupyter lab --allow-root \
--no-browser \
--port=8888 \
--ip=* \
--FileContentsManager.delete_to_trash=False \
--ContentsManager.allow_hidden=True \
--ServerApp.terminado_settings='{"shell_command":["/bin/bash"]}' \
--ServerApp.token=${JUPYTER_PASSWORD} \
--ServerApp.allow_origin=* \
--ServerApp.preferred_dir=/workspace &> /workspace/logs/jupyter.log &
echo "Jupyter Lab started"
fi
}
endangeredAI
endangeredAIOP9mo ago
Great! So the button appears now, however it shows up as yellow / not ready. Does it have anything to do with setting a password?
endangeredAI
endangeredAIOP9mo ago
No description
ashleyk
ashleyk9mo ago
Don't know, I set a password.
endangeredAI
endangeredAIOP9mo ago
oh i see what i did wrong. I forgot to call the function facepalm:SamiyaFacepalm:
Want results from more Discord servers?
Add your server