innovationOUtside / tm351vm-binder

See if we can generate a Binder/repo2docker build of the TM351 VM
MIT License
7 stars 4 forks source link

Windows docker cmd invocation #19

Closed canwaf closed 4 years ago

canwaf commented 4 years ago

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. image

(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.)

psychemedia commented 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.

canwaf commented 4 years ago

For some reason I didn’t get a notification about your reply, but I’ll take a look before the weekend.

psychemedia commented 4 years ago

@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.

canwaf commented 4 years ago

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.

  1. On install of Docker post reboot, you get this. image

  2. Takes you to here on Microsoft's website. image

  3. 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.

canwaf commented 4 years ago

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.

psychemedia commented 4 years ago

@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.

psychemedia commented 4 years ago

@canwaf PS Thanks for all your feedback:-)

psychemedia commented 4 years ago

Just a couple of comments while I remember re: mounting directories which relates to usability: