You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to deploy Pose App on a local network as I don't have access to the machine in-person.
In localhost-mode, the App spawns multiple Lightning Works that occupy random ports. This makes it hard to open the needed ports in the firewall. Opening up all ports is obviously not wanted. So simply setting the app URL to 0.0.0.0 would also not help in this case.
When I set LIGHTNING_CLOUDSPACE_HOST=0 and LIGHTNING_CLOUDSPACE_EXPOSED_PORT_COUNT=15 the app runs through 0.0.0.0 and the ports follow span the range from 7501 till 7515.
This seems to work. But the app doesn't load. One of the instances (the project_ui instance) creates a weird URL that looks like so: https://7503-0/root.project_ui
I tried to trace this down and got to some like in the multiprocess code. This one:
Description & Motivation
I am trying to deploy Pose App on a local network as I don't have access to the machine in-person.
In localhost-mode, the App spawns multiple Lightning Works that occupy random ports. This makes it hard to open the needed ports in the firewall. Opening up all ports is obviously not wanted. So simply setting the app URL to 0.0.0.0 would also not help in this case.
Example of running
lsof -i -P -n | grep LISTEN
When I set
LIGHTNING_CLOUDSPACE_HOST=0
andLIGHTNING_CLOUDSPACE_EXPOSED_PORT_COUNT=15
the app runs through 0.0.0.0 and the ports follow span the range from 7501 till 7515.This seems to work. But the app doesn't load. One of the instances (the project_ui instance) creates a weird URL that looks like so: https://7503-0/root.project_ui
I tried to trace this down and got to some like in the multiprocess code. This one:
pytorch-lightning/src/lightning/app/runners/backends/mp_process.py
Line 84 in ac3f1ee
And this one:
pytorch-lightning/src/lightning/app/runners/multiprocess.py
Line 74 in ac3f1ee
This seems to be the url that is generated when 'LIGHTNING_CLOUDSPACE_HOST' is set. I tried to set it to "any", "", or "0.0.0.0" with the same issue.
I got it working by editing those to lines to this:
f"http://<machine_hostname>:{port}"
Maybe I am missing something, but I couldn't find a better workaround.
Pitch
Setting 'LIGHTNING_CLOUDSPACE_HOST' seems to trigger the app and works to use consecutive ports to run.
Is it possible to allow the same mechanism when 'LIGHTNING_CLOUDSPACE_HOST' is unset?
This way, we would only have to set
LIGHTNING_APP_STATE_URL
to 0.0.0.0 without messing with the cloud deployment loagic.Alternatives
No response
Additional context
Version 2.2.5
cc @Borda
The text was updated successfully, but these errors were encountered: