diff --git a/.gitmodules b/.gitmodules index 7bd8ee1c..5d813d18 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,6 @@ -[submodule "third_party/isaacgym"] - path = third_party/isaacgym - url = ../../kscalelabs/isaacgym.git [submodule "third_party/humanoid-gym"] path = third_party/humanoid-gym url = ../../kscalelabs/humanoid-gym.git [submodule "third_party/IsaacGymEnvs"] path = third_party/IsaacGymEnvs - url = git@github.com:kscalelabs/IsaacGymEnvs.git + url = ../../kscalelabs/IsaacGymEnvs.git diff --git a/getting_started_colab_sim.ipynb b/getting_started_colab_sim.ipynb new file mode 100644 index 00000000..15104636 --- /dev/null +++ b/getting_started_colab_sim.ipynb @@ -0,0 +1,178 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "provenance": [], + "gpuType": "L4" + }, + "kernelspec": { + "name": "python3", + "display_name": "Python 3" + }, + "language_info": { + "name": "python" + }, + "accelerator": "GPU" + }, + "cells": [ + { + "cell_type": "markdown", + "source": [ + "This Notebook works on L4 and A100 GPUs" + ], + "metadata": { + "id": "sRtNitKlw1zw" + } + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "iYqTHUm8hv1F" + }, + "outputs": [], + "source": [ + "from google.colab import drive\n", + "drive.mount('/content/drive', force_remount=True)" + ] + }, + { + "cell_type": "code", + "source": [ + "%cd /content/drive/MyDrive\n", + "!git clone https://github.com/kscalelabs/sim.git" + ], + "metadata": { + "id": "16UZ4d3Nm1PY" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "cd /content/drive/MyDrive/sim" + ], + "metadata": { + "id": "pQ7Ev2668RqY" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "!apt-get update -y\n", + "!apt-get install python3.8 python3.8-distutils\n", + "!update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1\n", + "!update-alternatives --config python3\n", + "!apt-get install python3-pip\n", + "!python3 -m pip install --upgrade pip --user" + ], + "metadata": { + "id": "dmwa4ir7OfMU" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "!sudo apt-get install libpython3.8-dev\n", + "!pip install numpy" + ], + "metadata": { + "id": "TrLr6NG20IN4" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "!make install-dev" + ], + "metadata": { + "id": "HGAYjhc33_Ad" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "# Manually download IsaacGym_Preview_4_Package.tar.gz from https://developer.nvidia.com/isaac-gym\n", + "# And place it in your sim folder in google drive.\n", + "# OR use this slower upload option below\n", + "from google.colab import files\n", + "uploaded = files.upload()" + ], + "metadata": { + "id": "xl-_w0pIwgZH" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "!tar -xvf IsaacGym_Preview_4_Package.tar.gz\n", + "%env ISAACGYM_PATH=`pwd`/isaacgym\n", + "!export ISAACGYM_PATH=$(pwd)/isaacgym\n", + "!make install-third-party-external" + ], + "metadata": { + "id": "H52XAPEPOZ0k" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "!wget https://media.kscale.dev/stompy.tar.gz && tar -xzvf stompy.tar.gz\n", + "!python sim/scripts/create_fixed_torso.py" + ], + "metadata": { + "id": "fVReUppMRDEm" + }, + "execution_count": 10, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "%env MODEL_DIR=stompy" + ], + "metadata": { + "id": "j_7WABU14nHI" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "!python sim/humanoid_gym/train.py --task=legs_ppo --num_envs=4096 --headless" + ], + "metadata": { + "id": "xR7Wpx8aSJQX" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "# Untested\n", + "!python sim/humanoid_gym/play.py --task legs_ppo --sim_device cpu" + ], + "metadata": { + "id": "Gzgj4q5vV0TY" + }, + "execution_count": null, + "outputs": [] + } + ] +} \ No newline at end of file