-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (33 loc) · 1.43 KB
/
run_exp.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Run experiment via SSH
on:
push:
branches:
- runpod-rl_hopper # Set your branch here
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up SSH connection
uses: webfactory/ssh-agent@v0.5.1
with:
ssh-private-key: ${{ secrets.PRIVATE_KEY_GITHUB_ACTION }}
- name: SSH and Run
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.REMOTE_MACHINE_CONNECTION_STR }} << 'EOF'
cd ~/thinking
git pull
# source .venv/bin/activate
# python3 tasks/rl_hopper.py --clear
# python3 tasks/rl_hopper.py
# use tmux instead
# terminate existing session or restart
tmux kill-session -t runpod-rl_hopper
tmux new-session -d -s runpod-rl_hopper
tmux send-keys -t runpod-rl_hopper "source .venv/bin/activate" C-m
# assign env variables
tmux send-keys -t runpod-rl_hopper "export MUJOCO_GL=osmesa" C-m
# tmux send-keys -t runpod-rl_hopper "python3 tasks/rl_hopper.py --clear" C-m
tmux send-keys -t runpod-rl_hopper "python3 tasks/rl_hopper.py" C-m
EOF