This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM takuseno/unitree-rl-gym:latest | |
USER root | |
RUN apt-get update && apt-get install silversearcher-ag ripgrep libfuse2 fuse && \ | |
wget https://github.com/neovim/neovim/releases/download/v0.9.0/nvim.appimage && \ | |
chmod +x nvim.appimage && \ | |
mkdir -p /usr/local/bin && \ | |
mv nvim.appimage /usr/local/bin/nvim | |
USER gymuser |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM takuseno/isaacgym:latest | |
RUN git clone https://github.com/leggedrobotics/rsl_rl /home/gymuser/rsl_rl && \ | |
cd /home/gymuser/rsl_rl && \ | |
git checkout v1.0.2 && \ | |
pip install -e . && \ | |
git clone https://github.com/unitreerobotics/unitree_rl_gym /home/gymuser/unitree_rl_gym && \ | |
cd /home/gymuser/unitree_rl_gym && \ | |
pip install -e . && \ | |
pip install -U torch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyaudio | |
import wave | |
import numpy as np | |
from socket import socket, AF_INET, SOCK_DGRAM | |
FORMAT = pyaudio.paInt32 | |
CHANNELS = 1 | |
RATE = 16000 | |
CHUNK = 4096 | |
ADDRESS = '192.168.11.7' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import mlflow | |
import gorilla | |
import time | |
from nnabla.monitor import Monitor, MonitorSeries, MonitorTimeElapsed | |
from mlflow.utils.autologging_utils import try_mlflow_log | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import nnabla as nn | |
import nnabla.functions as F | |
import nnabla.parametric_functions as PF | |
import nnabla.solvers as S | |
#------------------------------- neural network ------------------------------# | |
def q_network(obs, action): | |
with nn.parameter_scope('critic'): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import nnabla as nn | |
import nnabla.functions as F | |
import nnabla.parametric_functions as PF | |
import nnabla.solvers as S | |
import argparse | |
import random | |
import os | |
import gym |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import nnabla as nn | |
import nnabla.functions as F | |
import nnabla.parametric_functions as PF | |
import nnabla.solvers as S | |
import argparse | |
import random | |
import os | |
import gym |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import nnabla as nn | |
import nnabla.parametric_functions as PF | |
import nnabla.functions as F | |
import nnabla.solvers as S | |
import random | |
import argparse | |
import gym | |
import os | |
import cv2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from subprocess import Popen, PIPE | |
from xml.etree.ElementTree import fromstring | |
def main(): | |
p = Popen(['nvidia-smi', '-q', '-x'], stdout=PIPE) | |
outs, errors = p.communicate() | |
xml = fromstring(outs) | |
num_gpus = int(xml.getiterator('attached_gpus')[0].text) | |
results = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
import tensorflow as tf | |
mode = 'maml' | |
seed = 0 | |
plot = True | |
innerstepsize = 0.02 # stepsize in inner SGD | |
innerepochs = 1 # number of epochs of each inner SGD | |
outerstepsize0 = 0.1 if mode == 'reptile' else 0.001 # stepsize of outer optimization, i.e., meta-optimization |