Open profLewis opened 4 years ago
The ideal solution would be to have the docker container write to OneDrive directly, so that writing from the notebook etc is synced (similar to dropbox). It is possible to do (I used it for backups in the past), but requires setting up. Maybe feasible via a notebook (it's just a config file, copying and pasting some "token" from onedrive, and setting up /etc/fstab
). This has the advante of set it up once, and it'll work forever
Your solution looks like it will work, but needs setting up variables (not obvious), and most students seem to struggle with finding the console.
Mumble mumble...
OK, what I used in the past was rclone
. Basically, you set up a sample config file, and then it'd be possible to change the user to be the student's OneDrive id. The thing is that I've only used rclone in interactive mode, which is quite straightforward, but I don't know how to do this automatically as you need to login to Microsoft to get some token via the browser:
Some notes
Hi - it doesn’t need setting up variables, or permissions or anything.
I suspect that OneDrive ucl is set be default in home and always had the same name. I’m trying to check that. But I think the process is :
These only if access to some sites eg google is blocked from where you are: 1a. Set up virus stuff that ucl vpn insists on (isd page) 1b. Run ucl vpn (isd)
Plan A. Use isd dockerhub.
Plan B. Using docker images ———— Install software we need;
Plan C. Anaconda and pull repo ————-
Need better test obvs.
If so,
Professor Philip Lewis, UCL
On 19 Jul 2020, at 15:25, José Gómez-Dans notifications@github.com wrote:
The ideal solution would be to have the docker container write to OneDrive directly, so that writing from the notebook etc is synced (similar to dropbox). It is possible to do (I used it for backups in the past), but requires setting up. Maybe feasible via a notebook (it's just a config file, copying and pasting some "token" from onedrive, and setting up /etc/fstab). This has the advante of set it up once, and it'll work forever
Your solution looks like it will work, but needs setting up variables (not obvious), and most students seem to struggle with finding the console.
Mumble mumble...
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
I think the -v
option is OK, I was just wondering whether we could simplify things a bit by standardising within the Docker container and limiting the potential for user fuck-ups outside Docker. Happy for you to test this (put it in a new branch maybe?), and I'll think about whether the rclone way is feasible/easy.
One last comment: What about Mac users? What's the name of ${LOCAL}
for mac?
command example. Here, use an alias or some similar way of simplifying the command, assuming they will generally run it this way with these default options set.
alias rund="docker run -p 8888:8888 -it -v ${HOME}'/OneDrive - University College London':'/home/jovyan/OneDrive - University College London' jgomezdans/geog"
then
rund bash -c "ls ~/'OneDrive - University College London'" rund lab
Thats a pretty good set up .. they start lab or whatnot, and see theor one drive directory monted. They had a 1 TB drive. No permissions to set or anything, and local (Onedrive file) maintains my user permissions.
I dont know how much we want to wrap / expose and how. some shell rather than an alias as here.? Ill see what is easiest in a powershell.
OK, this point about the script is useful. Mounting rclone is a pain due to permissions and the Docker security model. Your suggestion would then work as
runMe_final_final_works.sh
;-D (-> cue video)One further bit of neatness is that if all the data is OneDrive, if we need to update the Docker image with new packages etc, all user data is kept.
On 19 Jul 2020, at 17:19, José Gómez-Dans notifications@github.com wrote:
I think the -v option is OK, I was just wondering whether we could simplify things a bit by standardising within the Docker container and limiting the potential for user fuck-ups outside Docker. Happy for you to test this (put it in a new branch maybe?), and I'll think about whether the rclone way is feasible/easy.
One last comment: What about Mac users? What's the name of ${LOCAL} for mac?
See emails …. Its ~/One drive Ucl everywhere. The hassle is the spaces in the filename!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jgomezdans/geog_docker/issues/12#issuecomment-660670766, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOC3GX2T4TRLAZY5V2ZSVDR4MMJ7ANCNFSM4PBD66VA.
On 19 Jul 2020, at 17:44, José Gómez-Dans notifications@github.com wrote:
OK, this point about the script is useful. Mounting rclone is a pain due to permissions and the Docker security model. Your suggestion would then work as
Download & install Docker desktop (-> cue videos) Mount one drive storage (-> cue video) Download & run the following script: runMe_final_final_works.sh ;-D (-> cue video) Create an icon for script in point (3) so that every time you click on it, the magic happens One further bit of neatness is that if all the data is OneDrive, if we need to update the Docker image with new packages etc, all user data is kept.
And that if we have one drive attached on the Ucl nodes, they have the same data stored wherever!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jgomezdans/geog_docker/issues/12#issuecomment-660674175, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOC3GTFIHFWEOJ473HFUODR4MPGZANCNFSM4PBD66VA.
So, its as easy as:
LOCAL='/Users/plewis/OneDrive - University College London' NOTEDIR='/home/jovyan/notebooks/one_drive'
docker run -v "${LOCAL}":"${NOTEDIR}" -e NOTEDIR="$NOTEDIR" jgomezdans/geog bash -c '(uname -a && echo "hello world") > ${NOTEDIR}/hello.world'
Then look in one drive
and persistence check:
docker run -v "${LOCAL}":"${NOTEDIR}" -e NOTEDIR="$NOTEDIR" jgomezdans/geog bash -c 'cat ${NOTEDIR}/hello.world'
could set that as a test?