SyneRBI / SyneRBI_VM

Virtual Machine with pre-installed SyneRBI software
http://www.ccpsynerbi.ac.uk
Apache License 2.0
3 stars 7 forks source link

auto-start gadgetron and jupyter server? #117

Closed KrisThielemans closed 2 years ago

KrisThielemans commented 5 years ago

It could be nice if the gadgetron server would start automatically if the VM starts.

Advantages:

Disadvantages:

I guess the disadvantages weight more... Anyone any suggestions?

casperdcl commented 5 years ago

was thinking about doing something similar for the docker images.

What about something in the login env file like:

pidof gadgetron && which gadgetron\
  && (gadgetron >> gadgetron.log &)\
  && export GADGETRON_AUTOSTARTED=1)

We could also add a .(bash_)logout file:

[ -n "$GADGETRON_AUTOSTARTED" ] && pidof gadgetron && kill -n 15 $(pidof gadgetron)

This would however require at lest some sort of "login" to the VM.

For docker containers, there is a nice mechanism for daemon/headless/service containers which are started in the background, expose ports, and gracefully run terminate commands when stopped - so they really wouldn't need an explicit login: simply docker start sirf && firefox localhost:8888 (assuming "host" networking)

paskino commented 5 years ago

Jupyter should also be configured with a simple password rather than with the default token.

casperdcl commented 5 years ago

I used the same one as the VM login for the docker jupyter server (virtual), not sure what's in the Azure one.

paskino commented 5 years ago

with #127 the user is required to launch 2 terminals and type gadgetron and jupyter notebook.

I believe this is a relative low price. Otherwise we could add items to be started at boot with init, but it is a bit overkill, isn't it?

KrisThielemans commented 2 years ago

let's not do this. Instructions are clear enough