How to enable Jupyter Notebook and SSH support in a custom Docker container?
I built my own docker image to deploy on a pod. After creating the Custom Template with my docker image, there is no option to enable Jupyter Notebook or SSH for it.
I tried my best to imitate the official Runpod containers, by installing
jupyterlabs
and openssh-server
, but when setting up the pod, there is still no option to enable Jupyter Notebooks or SSH on the pod.
I am also not able to find any guides on how to incorporate Jupyter notebook support on a custom docker image.
How do I do it?10 Replies
Look at start.sh script https://github.com/runpod/containers/blob/main/container-template/start.sh
GitHub
containers/container-template/start.sh at main · runpod/containers
🐳 | Dockerfiles for the RunPod container images used for our official templates. - runpod/containers
Thanks. If I only wanted to enable jupyterlabs, can I just copy over the
start_jupyter()
and execute it in start.sh
? Do I need to copy over the other functions like start_nginx()
, execute_script()
, export_env_vars
?I would include it all
Well I copied over as much as the code as possible. And there is still no option to enable jupyter/ssh, darn it.
you do not need to check anything here
just epose port 8888 in http section
Can you elaborate on this? What http section?
when you edit your template
Is the "connect to jupyter" option supposed to show up at the "Connect" popup if I did things right?
if you added it correct
Do u have a particular CMD command u must override or something?
If not u can just use a runpod pytorch template and not override the cmd / entry point
and it will just work
Someone by using the runpod template as the base was also able to just append the following to their start command along with whatever else they wanted
https://discord.com/channels/912829806415085598/1194695853026328626/1194759592865955952
“Actually someone had also recommended you can do this in your CMD, since they had issue finding the start.sh script.
So you could as your start CMD command start up whatever command you want + also do this bash command.
maybe have a bash script for startup execute the above + your own thing.“