Closed blairj09 closed 1 year ago
It seems that this error is stemming from a lacking configuration in Jupyter Notebooks. It's attempting to use sh
instead of bash
, but still bootstraps all of the contents of /etc/profile.d
that Google has baked into the image, most of which uses syntax not supported by sh
. We'll just need to figure out how to reconfigure how the Terminal's login shell to fix this I think.
This is now fixed, we just had to configure the default shell command for Jupyter to be /bin/bash
instead of /bin/sh
. We now copy the following JSON file into /opt/python/jupyter/etc/jupyter/jupyter_notebook_config.json
at the end of the image build:
{
"NotebookApp": {
"nbserver_extensions":{
"rsconnect_jupyter": true
},
"terminado_settings": {
"shell_command": ["/bin/bash"]
}
},
"ServerApp": {
"terminado_settings": {
"shell_command": ["/bin/bash"]
}
}
}
We're setting the shell in both NotebookApp
and ServerApp
because it's being moved to ServerApp
in future versions of Jupyter Notebook (7+ I think).
Thanks for the fix - confirmed this today in ianprstudio/gcw-workbench:2022.03.0-6
When starting a new terminal from Jupyter Notebook in the GCP Cloud Workstation image, the terminal opens but shows a few errors and doesn't allow for user input: