Closed canwaf closed 4 years ago
@canwaf Sorry I've taken so long to get round to this...
Re: the share - yes, this should be tm351share
. (I am trying to create some generic instructions so keep bouncing between a couple of course containers trying things out!)
Hmm... so: you can create a file in JupyterLab in /home/jovyan/notebooks
but it doesn't appear in C:\tm129share\notebooks
on host?
The //c/home/jovyan/notebooks
looks odd to me too, eg in the sense of the C. Or is that just how it is trying to mount from windows into a linux container? Mounting -v //c/tm129share/notebooks:/home/jovyan/notebooks
would seem more reasonable? Does -v c:/tm129share/notebooks:/home/jovyan/notebooks
NOT work?
We also need to be able to give students instruction on mounting from an arbitrary path on an arbitrary drive, eg D:\ou\tm351files
It would be really handy to get a list of formulations that do and don't work (and a rationale why); eg something that could go into an FAQ and be given to OU IT helpdesk.
For some reason I didn’t get a notification about your reply, but I’ll take a look before the weekend.
@canwaf I think our current command for windows takes the form:
docker run --name tm351vce -d -p 35180:8888 -v $pwd\notebooks:/home/jovyan/notebooks -v $pwd\openrefine_projects:/home/jovyan/openrefine -e JUPYTER_TOKEN="letmein" ousefulcoursecontainers/ou-tm351:current
I'm not sure how / what quotes or escapes are required where if either or both volume mount path names on host and in container contain spaces in the path.
Just as a warning, the Docker installation is now a bit convoluted. It now requires WSL2, which has to be installed separately. Docker prompts for it, and the instructions are fairly intuitive.
On install of Docker post reboot, you get this.
Takes you to here on Microsoft's website.
Installation is using wsl_update_x64.msi, takes about 3 seconds including hitting next/next. Then a new reboot.
After the reboot I will try invoking docker. Comment to follow.
All works as advertised now, only thing to note that unless people save files in the notebooks and openrefine_projects folders, the files won't be visible on the host. (i.e. the main folder where the TM351 VM Installation Test Jupyter Notebook isn't the mount point, which most will likely expect.)
Let me know if you need any other windows testing. Happy to help @psychemedia.
@canwaf "All works as advertised now, only thing to note that unless people save files in the notebooks and openrefine_projects folders, the files won't be visible on the host"
Yep; I've added that as a clarification to our s/w guide (a Word doc); I think the guide also covers the WSL2 sttuff (but the screenshot ypu provided is useful:-); I'll try to get a version of the official guide into the public domain once it's been edited and formally published.
@canwaf PS Thanks for all your feedback:-)
Just a couple of comments while I remember re: mounting directories which relates to usability:
repo2docker
build process copies all the repo contents into /home/jovyan
; this includes a hidden .jupyter
dir which contains files that style the notebook server. If we mount onto /home/jovyan
, we clobber that style file unless we can find some other persistent location in the container for it? I'm not sure how repo2docker
users the start
file? Could we use as a scriptable file that could copy files from a stash somewhere into a mounted onto /home/jovyan
directory? Or might there be a race between start
and the volume mount?/home/jovyan
, then we can actually pass files to students inside the container in the /home/jovyan
path. We can also stash files in $CONDA_DIR
if we need to persist them in a repo2docker
built container as per this postBuild
example step. We can then retrieve them from notebook command line (eg cp -ir $CONDA_DIR/workfiles/recover/* /home/jovyan/
)
The command line invocation is:
docker run --name tm351test --rm -d -p 8895:8888 -v //c/tm129share/notebooks://c/home/jovyan/notebooks -v //c/tm129share/openrefine_projects://c/home/jovyan/openrefine -e JUPYTER_TOKEN="letmein" ousefuldemos/tm351-binderised:latest
This is after adding c:/tm129share to my File Share paths in the docker desktop app.
(Note: the bindings don't technically work - i.e. I create a file in Jupyter Labs and nothing shows up in the host directories (the directories do get created though)).
Finally, the mount you're using is tm129share. Should it not be tm351share?
(As always, happy to continue to help you test so long as I have my work laptop.)