Exposing Custom Ports#
HPE Machine Learning Development Environment allows you to expose a custom network port in a task container, and access it using a local tunnel.
For multi-container tasks, such as distributed training experiments, only the ports on the chief
rank=0) will be exposed.
First, specify the ports in the
environments -> proxy_ports section of the experiment or task
config, for example:
environment: proxy_ports: - proxy_port: 8265 proxy_tcp: true
Launch your task or experiment normally. Then, use the
det CLI to start a tunnel. Running the
following command will setup a tunnel proxying
localhost:8265 to port
8265 in the task
python -m determined.cli.tunnel --listener 8265 --auth $DET_MASTER $TASK_ID:8265
where $DET_MASTER is your HPE Machine Learning Development Environment master address, and $TASK_ID
is the task id of the launched task or experiment. You can look up the task id using CLI command
det task list.
Alternatively, you can use a shortcut which allows to launch the experiment, follow its logs, and run the tunnel all at once:
det e create config_file.yaml model_def -f -p 8265
Optionally, you can run a tunnel with determined authentication turned off. This mode may be useful when the proxied app is handling security by itself, such as a web app protected by username and password. To use it,
unauthenticated: trueoption in the task config.
--authoption from the tunnel CLI.
environment: proxy_ports: - proxy_port: 8265 proxy_tcp: true unauthenticated: true
python -m determined.cli.tunnel --listener 8265 $DET_MASTER $TASK_ID:8265