I have followed the steps in the official CUDA on WSL tutorial (https://docs.nvidia.com/cuda/wsl-user-guide/index.html#ch05-sub02-jupyter) to set up a jupyter notebook. However, I can't figure out how to change the initial working directory. I tried mounting a local directory with the -v
switch as well as appending to the launch command --notebook-dir
, but neither one of these solutions worked. The jupyter notebook will always start under "/tf" no matter what I do. Ideally, I would like this to be the same working directory as the one I have on Windows (C:\Users\MyUser).
The only thing I haven't tried is changing the WORKDIR in the docker image "tensorflow/tensorflow:latest-gpu-py3-jupyter" supplied by hub.docker.com as I am not even sure if it is possible to edit it (line 57).
Here is a sample command I have tried running:
docker run -it --gpus all -p 8888:8888 -v /c/Users/MyUser/MyFolder:/home/MyFolder/ tensorflow/tensorflow:latest-gpu-py3-jupyter jupyter notebook --allow-root --ip=0.0.0.0 --NotebookApp.allow_origin='https://colab.research.google.com' --notebook-dir=/c/Users/MyUser/
What is the easiest way to achieve this?