R
RunPod4mo ago
Dennis K

Ignore root start.sh and use custom persistent script.

Im trying to avoid using start.sh since I need to experiment with some different processes. I've tried to copy the contents of start.sh and to point via the container start command to a install_req.sh script that is in the workspace folder. Im also unchecking "start jupyter notebook" and "ssh terminal access" since I don't want the container to run the original start.sh file. Maybe here Im confusing how these work or Im missing something. The logs show that all is good but I can't use the runpod ui to start jupyter anymore and the actual ssh connection does not work anymore. Why is that happening although install_req.sh is the same as start.sh in the root dir? Also , I've noticed that in the start.sh, there are some references to a pre_start.sh and a post_start.sh script in the root but I can't find them. I don't want to get into messing with docker just now. Thank you.
13 Replies
ashleyk
ashleyk4mo ago
pre_start.sh and post_start.sh scripts are optional, which image are you using? It would also help if you can share the content of your install_req.sh script. Its impossible to know whats wrong with it without seeing it.
Dennis K
Dennis K4mo ago
Im running install_req.sh from the workspace folder with this starting command bash -c '/workspace/install_req2.sh'
ashleyk
ashleyk4mo ago
I assume this means you have the script on a network volume that you've attached to the pod? Jupyter won't start unless you add an environment variable called JUPYTER_PASSWORD to your pod.
Dennis K
Dennis K4mo ago
Yes.
No description
ashleyk
ashleyk4mo ago
environment variables is not expanded
Dennis K
Dennis K4mo ago
There are no env variables on the starting command. Don't they populate automatically from the start.sh script? Or these are related to the ssh terminal access and start jupyter notebook checkboxes? If so, does it mean I can't bypas in anyway the start.sh at the root? The final goal would be to add some commands right before # Start jupyter lab code is exectued in the start.sh. But since start.sh is not persistent I created this install_req.sh in the workspace volume
ashleyk
ashleyk4mo ago
JUPYTER_PASSWORD is not populated automatically, if you don't set it, thats why your Jupyter isn't available.
justin
justin4mo ago
https://github.com/justinwlin/Runpod-OpenLLM-Pod-and-Serverless/blob/main/Dockerfile https://github.com/justinwlin/Runpod-OpenLLM-Pod-and-Serverless/blob/main/start.sh Nothing to add, but just adding my stuff here for reference: you can see how I did mine, I disabled password checking for my jupyter notebook / have it setup to launch my own start.sh.
ashleyk
ashleyk4mo ago
PUBLIC_KEY is injected automatically though so I am not sure why your SSH isn't working, unless you perhaps didn't add your SSH public key to your profile.
Dennis K
Dennis K3mo ago
Thank you for your answers. But what exactly do the Start Jupyter Notebook and SSH Terminal Access checkboxes change? Do they modify the start.sh somehow?
ashleyk
ashleyk3mo ago
No, they can't modify the script, they probably inject something into your pod configuration.
justin
justin3mo ago
Prob some sort of env variable is being set at startup which their script reads