Use your GPU
Exposing ports
Give a web app or API on your GPU a public HTTPS link.
Run a web app, API or dashboard on your GPU and give it a link, without SSH tunnels.
Expose a port
- Start your app inside the GPU, listening on
0.0.0.0(not127.0.0.1) on a port of your choice, e.g.8000. - Open the GPU, go to the Ports tab and choose Expose port.
- Enter a name and the port number and pick a type:
- HTTP gets a public HTTPS link on flint.monster.
- TCP or UDP gets an address and port to connect to directly.
The link appears straight away. Remove it from the same tab when you're done.
Example: a quick web server
bash
cd /workspace
python3 -m http.server 8000 --bind 0.0.0.0Expose port 8000 as HTTP and open the link.
Apps behind a path
HTTP links are served under a path like /p/<gpu-id>/8000/. Most frameworks work as they are. If yours builds absolute links (some dashboards do), set its base path to that prefix. The request carries an X-Forwarded-Prefix header with the prefix for apps that read it.
Good to know
- Anyone with an HTTP link can open it. Add your own login if the app isn't meant to be public.
- Exposed ports only work while the GPU is running.
- JupyterLab already has its own Jupyter button; you don't need to expose it.
Flint documentation