working directory of a notebook run by startup script is not its real path, but '/'

324 views Asked by At

I have a notebook instance with a startup script that uses papermill to execute a notebook. The problem is that the working directory is '/' and not the path of the file. How do I get the path of the file so I can set it as the working directory?

This is how I update my script:

gcloud... --metadata startup-script="/opt/conda/bin/papermill /home/jupyter/some_dir/mynotebook.ipynb /home/jupyter/some_dir/out1.ipynb"
0

There are 0 answers