0

I'm running a Google Colab notebook on a local Jupyter instance, which I'm running in a Docker container, following these instructions from Google.

It works great, except the notebook has all its paths hardcoded to Colab's working folder for the kernel, which is /content. However, in Jupyter, the working folder is /workspace. If I try to change to move out of the /workspace folder in the notebook it triggers an exception.

How can I modify Jupyter to change its /workspace folder to be /content?

As I'm using Docker, an ideal solution would be either with either an environment variable, a one-time shell command or a command line argument to jupyter.

Tim MB
  • 4,413
  • 4
  • 38
  • 48
  • 1
    Are you using the magic command `%cd` in your notebook to try and change the working directory. Using that, you should be able to do it in the notebook if possible and then add that into the notebook as your 'command line argument to jupyter'. See the bottom of [here](https://stackoverflow.com/a/40514875/8508004) for what you are trying to target as a setting in Jupyter's server. Or with Docker container start command you can map directory to workspace using something like https://medium.com/fundbox-engineering/overview-d3759e83969c . – Wayne Nov 18 '22 at 19:19

0 Answers0