Skip to content

DENBI Cloud server

Simon Anders edited this page Mar 11, 2024 · 5 revisions

Make new account for somebody

  • Go to deNBI Cloud Portal: https://cloud.denbi.de/portal
  • Choose our project (e.g. 'tcae')
  • Click on "Add member", there on "Copy Link"
  • Give link to new user

Activate account as new user

  • Click on link to get denbi account, which will get connected to UniID account
  • Now project admin can add user to project (e.g., via link received by e-mail)
  • Grant consent as instructed
  • Upload SSH key to deNBI cloud portal
  • Try log in: ssh <denbi_user_name>@denbi-jumphost-01.bioquant.uni-heidelberg.de (should work without password using SSH key just uploaded)

Log in to instance

Use Jupyter

To run Jupyter on a remote client, you need to forward its port to your local computer, as follows:

  • Log in with local port forwarding, by adding -L <port>:127.0.0.1:<port> to the ssh command:
ssh -J <denbi_user_name>@denbi-jumphost-01.bioquant.uni-heidelberg.de <instance_user_name>@<instance_floating_ip> -L <port>:127.0.0.1:<port>

(Here, <port> is an arbitrary port number between 1024 and 65535. You have to choose something different than what is used by others. (Otherwise, you will late be told that the port is in use.)

  • If you have not done that yet, install Jupyter with pip install jupyter-lab. You may want to do that in a Python virtual environment.
  • Activate the Python virtual environment.
  • Start Jupyter Lab with jupyter-lab --ip 0.0.0.0 --port <port> --no-browser
  • In your local computer's web browser, navigate to http://127.0.0.1:<port>/lab?token=<token>, i.e., open the URL displayed by Jupyter on the console. (Two are displayed, choose the one containing 127.0.0.1.)

Explanation: The Jupyter server will listen for connection requests by web browsers on the specified port. When run locally, it then opens a browser window requesting a page from localhost at this port. As our browser is not on the same machine as our Jupyter instance, we need to ask ssh to forward the port: Because of the -L option, ssh will listen for connection requests on that port on your local client and forward them to the host machine. By default, Jupyter only accepts connections from localhost (127.0.0.1); the --ip 0.0.0.0 tells it to accept incoming connections from all IPs. Finally, --no-browser instructs jupyter-lab to not try itself to open a browser window.