How to ... - Valentyn1997/xray GitHub Wiki
Step by step tutorial
- Connect to remote using local terminal:
ssh *hitansh*@10.195.1.150 -i *~/.ssh/hitansh - In remote, create new tmux-session:
tmux new -s <session_name> - Tmux will create virtual command line, which should look like this:
- Do your stuff in virtual command line (e.g. start training:
PYTHONPATH=../../ python3 train.py)
- Type
Ctrl+Band thend- to detach a session. - Type
tmux ls, to see all active sessions. - Type
tmux attach-session -t <session_name>, to attach existing session. - To kill existing session, type in virtual command line:
Ctrl + Bandx.
Ref: https://linuxize.com/post/getting-started-with-tmux/.
Step by step process Mac/Windows:
(Only change *stuff* with your credits)
- Open terminal
- Jupyter is already installed both machines? Most probably yes.
- Connect to your remote account using local terminal:
ssh *hitansh*@10.195.1.150 -i *~/.ssh/hitansh - After connecting: type this remotely:
jupyter notebook --no-browser --port=8889 - Keep that terminal running.
- Open new local terminal.
- Connect as in step 3
- Type:
jupyter notebook list - Copy the token
- Open another local terminal
- Type locally:
ssh -N -f -L localhost:8889:localhost:8889 *hitansh*@10.195.1.150 -i *~/.ssh/hitansh - Visit localhost:8889 locally on browser
- Paste the token that you copied in step 9
Ref: https://amber-md.github.io/pytraj/latest/tutorials/remote_jupyter_notebook
Step by Step process for Mac/Windows:
- Open terminal locally
- Connect to remote
- Type this if not already installed (on remote):
pip3 install mlflow -
cd xray/src/models(this folder should contain mlruns folder) mlflow ui
Do not close this.
- Now open local terminal
- locally type this: (change
<username>stuff with your credits)ssh -N -f -L localhost:8892:localhost:5000 <username>@10.195.1.150 -i *~/.ssh/id_rsa - Visit localhost:8892
Ref: https://www.mlflow.org/docs/latest/tutorial.html
To pull data from dvc remote on openstack:
git pull- Be sure, that you have private key named id_rsa stored in .ssh/
- Install correct dvc:
pip install dvc[ssh] - Run
dvc remote add -f -d myremote ssh://<username>@10.195.1.150:/home/ubuntu/xray_data/in project directory. - Run
dvc pull.
You can run: dvc remote modify --local myremote keyfile <your ssh key file> if the private key is not names id_rsa (see: https://dvc.org/doc/commands-reference/remote-modify)
Push:
dvc status
dvc commit
dvc push
Note1: update data.dvc in git as well by using git commit Note2: rename config to config.local and empty the contents of config