|
12 | 12 | "from pathlib import Path\n", |
13 | 13 | "from ctypes import cdll\n", |
14 | 14 | "import sys\n", |
| 15 | + "\n", |
15 | 16 | "is_conda = 'CONDA_PREFIX' in os.environ or 'CONDA_DEFAULT_ENV' in os.environ\n", |
16 | 17 | "if is_conda:\n", |
17 | 18 | " version_info = sys.version_info\n", |
18 | 19 | " if version_info.major == 3 and version_info.minor >= 8:\n", |
19 | | - " conda_lib_path = Path(sys.executable).parent.parent / f\"lib/libpython{version_info.major}.{version_info.minor}.so.1.0\"\n", |
| 20 | + " conda_lib_path = Path(\n", |
| 21 | + " sys.executable).parent.parent / f\"lib/libpython{version_info.major}.{version_info.minor}.so.1.0\"\n", |
20 | 22 | " else:\n", |
21 | | - " conda_lib_path = Path(sys.executable).parent.parent / f\"lib/libpython{version_info.major}.{version_info.minor}m.so.1.0\"\n", |
| 23 | + " conda_lib_path = Path(\n", |
| 24 | + " sys.executable).parent.parent / f\"lib/libpython{version_info.major}.{version_info.minor}m.so.1.0\"\n", |
22 | 25 | " python_lib = cdll.LoadLibrary(str(conda_lib_path))\n", |
23 | 26 | " print(f\"Load Python lib {conda_lib_path}\")\n" |
24 | 27 | ] |
|
83 | 86 | "vec_task.VecTask.create_sim = wrapped_create_sim\n", |
84 | 87 | "\n", |
85 | 88 | "# Create web visualizer\n", |
86 | | - "web_visualizer = create_isaac_visualizer(port=6000, host=\"localhost\", keep_default_viewer=False, max_env=16, scene_offset=np.array([40.0, 40.0]))\n", |
| 89 | + "web_visualizer = create_isaac_visualizer(port=6000, host=\"localhost\", keep_default_viewer=False, max_env=16,\n", |
| 90 | + " scene_offset=np.array([40.0, 40.0]))\n", |
87 | 91 | "\n", |
88 | 92 | "\n", |
89 | 93 | "################################################################################################\n", |
|
292 | 296 | "outputs": [], |
293 | 297 | "source": [ |
294 | 298 | "# Modify the IP if the jupyter server is not localhost\n", |
| 299 | + "# If your remote server has a public ip, the machine ip should be that one\n", |
| 300 | + "# If you are using ssh port forwarding like: ssh YOUR_SERVER -L 7000:localhost:7000 to forward port 7000 from your server to local machine, it should still be your localhost\n", |
295 | 301 | "machine_ip = \"127.0.0.1\"\n", |
296 | 302 | "web_visualizer.jupyter_cell(url=f\"http://{machine_ip}:7000/static/\", height=400)" |
297 | 303 | ] |
|
0 commit comments