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
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.
Im running install_req.sh from the workspace folder with this starting command
bash -c '/workspace/install_req2.sh'
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.Yes.
![No description](https://cdn.answeroverflow.com/1216829319695826974/image.png)
environment variables is not expanded
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
JUPYTER_PASSWORD
is not populated automatically, if you don't set it, thats why your Jupyter isn't available.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.
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.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?
No, they can't modify the script, they probably inject something into your pod configuration.
Prob some sort of env variable is being set at startup which their script reads