NeuroDesk / neurodesktop

The plug-and-play, browser-accessible, containerised data analysis environment.
https://www.neurodesk.org
MIT License
42 stars 12 forks source link

container management script for linux and windows #64

Open stebo85 opened 2 years ago

stebo85 commented 2 years ago

would it make sense to build a little run-script for neurodesktop that

civier commented 2 years ago

Yes. I think it will be very useful, at least for Swinburne Neuroimaging fellows. With the new neurodesktop, the fellows upgrade their neurodesktop by themselves, and we indeed came into all the problems the script can solve (e.g., old version running). Another issue that such a script might be solving is running neurodesktop docker in the background, and just presenting the output to the user with "tail -f" or a like. This way users won't be able to accidentally kill the container when pressing "Ctrl+C" rather than closing the terminal window.

Best, Oren

On Tue, Nov 16, 2021 at 9:53 AM Steffen Bollmann @.***> wrote:

would it make sense to build a little run-script for neurodesktop that

  • checks if a new container version is availabe,
  • checks permissions on consistent storage directory
  • starts neurodesktop with the right settings,
  • asks the user to stop or pause the container

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NeuroDesk/neurodesktop/issues/64, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7FUI6AIXLZXC4HOTXKOEDUMGFOPANCNFSM5IC2TGEA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

thomshaw92 commented 2 years ago

67

@stebo85 Brainhack project for me :) Need to find someone with a Mac to help with their startup script.

civier commented 2 years ago

I have a Mac and would be happy to test.

Oren

-- Oren Civier Neuroimaging Informatics Fellow Swinburne Neuroimaging | National Imaging Facility https://anif.org.au/team/oren-civier/ https://www.swinburne.edu.au/neuroimaging

Swinburne University of Technology Hawthorn Campus, Advanced Technologies Centre, Room 914 +61 3 9214 4628 | +61 4 3101 6603 @.*** (Email/Teams video call) https://twitter.com/orencivier

On Wed, 24 Nov 2021, 09:33 Thom Shaw, @.***> wrote:

67 https://github.com/NeuroDesk/neurodesktop/issues/67

@stebo85 https://github.com/stebo85 Brainhack project for me :) Need to find someone with a Mac to help with their startup script.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/NeuroDesk/neurodesktop/issues/64#issuecomment-977233171, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7FUI7SEQPURCSOYCUTGELUNQJEFANCNFSM5IC2TGEA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

thomshaw92 commented 2 years ago

OK Windows is done - Linux should be easy (just need to make the script executable and run it - assuming most linux users will be familiar with command line anyway?)

Mac is a pain.... 3 options 1) make a macOs app and distro on the app store (this is painful and requires a bit of work + $99 per year to host it on the app store. 2) have a .command script that the user downloads and runs on terminal. This doesn't work out of the box as the script has to be made executable, which requires code and terminal 3) have an app that is shared privately (needs the IDs of the computers shared with + $99 per year) 4) create a workflow or app in "Automator" with the executable bash script as the action, and share this as a .dmg file that can be run. https://discussions.apple.com/thread/3033134 https://discussions.apple.com/thread/2339003

Going to go with number 4 and see how we go. @stebo85

thomshaw92 commented 2 years ago

@stebo85 do we have a Neurodesk icon that I can use as a package icon for an executable?

civier commented 2 years ago

@PJLYONS (Paris Lyons) Do we have an icon-sized version of the Neurodesk logo?

aswinnarayanan commented 2 years ago

Hi @thomshaw92. We have these two https://github.com/NeuroDesk/neurocommand/blob/main/neurodesk/icons/aedapt.png https://github.com/NeuroDesk/neurocommand/blob/main/neurodesk/icons/neurodesk.png

Paris-Lyons commented 2 years ago

Thanks @aswinnarayanan! @civier if you need the logo in any other format just let me know!

civier commented 2 years ago

Thanks Paris. I don't know if Paris gets credit for that anywhere (she should!), but she is the creative force behind our beautiful logos.

On Thu, Dec 2, 2021 at 2:19 PM Paris @.***> wrote:

Thanks @aswinnarayanan https://github.com/aswinnarayanan! @civier https://github.com/civier if you need the logo in any other format just let me know!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NeuroDesk/neurodesktop/issues/64#issuecomment-984256127, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7FUIYICUBE2PDB4STBVG3UO3QVDANCNFSM5IC2TGEA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

stebo85 commented 2 years ago

work left:

stebo85 commented 2 years ago

closing for now: the binaries now start the latest version of the desktop available. This helps us, because a rebuilding of the binaries with a current version would trigger virus scanners and trying to identify the current release needs an additional module for powershell that's not installed by default (webrequests (?))

thomshaw92 commented 1 year ago

reopening

civier commented 1 year ago

Hi @thomshaw92

I believe you reopened the issue because you'll work on it in the Hackathon.

I'd actually be interested that you check whether the Linux version of the starter app works well on the ARDC virtual desktop. Last time I tested it, it wasn't smooth. I know that the ARDC virtual desktop already has a neurodesktop desktop, but sometimes people need to use the latest version of Neurodesktop and it is still not available in the ARDC virtual desktop. In this case, they can just run the Neurodesktop docker inside a basic Linux ARDC virtual desktop. This can also help in cases when the built-in Neurodesktop behaves differently than the docker version.

A major problem however with running the Neurodesktop docker within an ARDC virtual desktop is the copy and paste. I didn't manage to fix it so one can copy from the host computer and into the Neurodesktop docker that is running within the ARDC virtual desktop. If somebody in the brainhack wants to look into this, would be super!

Let me know if I'm unclear and good luck! Oren

thomshaw92 commented 1 year ago

Will look into it too @civier ! :D

stebo85 commented 1 year ago

@civier - restarting the nectar desktop should update the neurodesktop version - have you tried that :?

civier commented 1 year ago

@civier - restarting the nectar desktop should update the neurodesktop version - have you tried that :?

I don't recommend it to people because I don't know how to check what is the Neurodesktop docker version that the current ARDC VDS Neurodesktop desktop is based on. Is is recorded anywhere online? Or, who should I ask?

stebo85 commented 1 year ago

Dear @civier

Nectar doesn't run the docker container - they run neurocommand natively inside a vm. When starting up the vm the latest version will automatically be loaded. However, you should also be able to update the container versions manually.

Running docker inside this vm and running guacamole inside guacamole what you are proposing is not a good idea.

civier commented 1 year ago

Thanks Steffen. I know that the ARDC virtual desktop doesn't run the docker version, but I wasn't aware it's loading the latest version of neurocommand.

By "loading", do you mean that the ARDC virtual desktop clones and builds the latest version of neurocommand every time it starts? https://www.neurodesk.org/docs/neurocommand/getting-started/linux/

And what about the tools / settings of neurodesktop that are in the latest neurodesktop docker recipe? How do I know if they are already available in the ARDC VDS Neurodesktop desktop?

Best, Oren

aswinnarayanan commented 1 year ago

@stebo85 I think @civier is correct The VDS desktops pull the latest neurocommand when the VDS image gets build so it might not be latest build of neurocommand (so far its been updated every couple of months)

Any user who needs the latest neurocommand can go in pull the latest version by updating /neurocommand using these steps https://www.neurodesk.org/docs/neurocommand/getting-started/linux/

I'd actually be interested that you check whether the Linux version of the starter app works well on the ARDC virtual desktop. Last time I tested it, it wasn't smooth. I know that the ARDC virtual desktop already has a neurodesktop desktop, but sometimes people need to use the latest version of Neurodesktop and it is still not available in the ARDC virtual desktop.

@civier, this is managed by the nectar build and not the linux start script, so we can't fix it from there, it'll be something incorporated into the nectar recipe that ARDC manages. This raises a good qn...

We need to hit a fine balance between updates and breaking existing work.

neurocommand has two main components

  1. neurocommand build/installer code
  2. application list contained in apps.json

It seems to me that apps.json needs to be most up to date across all clients as they need access to latest container list.

One suggestion is we move apps.json into its own location as the central "source of truth" for application listing. And have all neurodesk clients (neurocommand, neurodesktops, VDS, jupyters) retrieve apps.json when loading up etc

cvmfs requires a network connection anyways, the machine would be expected to have access to apps.json And for non-cvmfs installs, we cache a local apps.json

I think this would also simplify the CI on neurocommand

stebo85 commented 1 year ago

Ahh - we discussed a while ago that we wanted to always update to the latest version when the VDS desktop starts - so this wasn't incorporated?

Yes, moving apps.json to cvmfs could be a solution. Another idea: would it make sense to always update when the desktop starts - similar to what we do in the jupyter instances? And in addition, adding a little shortcut to update a running desktop?