isaac-sim/OmniIsaacGymEnvs

How can I change the default nucleus server?

kim4375731 opened this issue · 0 comments

I setup the OmniIsaacGymEnvs repo as docker container in a remote server. The server does not have internet connection.

I instantiated with the container with following command:

docker run --privileged --name isaac-sim --entrypoint bash -it -d --gpus all -e "ACCEPT_EULA=Y" --network=host \
-e "PRIVACY_CONSENT=Y" \
-v ${PWD}:/workspace/omniisaacgymenvs \
-v ~/docker_rsc/isaac-sim/cache/kit:/isaac-sim/kit/cache:rw \
-v ~/docker_rsc/isaac-sim/cache/ov:/root/.cache/ov:rw \
-v ~/docker_rsc/isaac-sim/cache/pip:/root/.cache/pip:rw \
-v ~/docker_rsc/isaac-sim/cache/glcache:/root/.cache/nvidia/GLCache:rw \
-v ~/docker_rsc/isaac-sim/cache/computecache:/root/.nv/ComputeCache:rw \
-v ~/docker_rsc/isaac-sim/logs:/root/.nvidia-omniverse/logs:rw \
-v ~/docker_rsc/isaac-sim/data:/root/.local/share/ov/data:rw \
-v ~/docker_rsc/isaac-sim/documents:/root/Documents:rw \
-e "OMNI_SERVER=omniverse://localhost/MyNVIDIA/Assets/Isaac/2023.1.1" \
-e "OMNI_USER=omniverse" -e "OMNI_PASS=omniverse" \
nvcr.io/nvidia/isaac-sim:2023.1.1

The thing is, when running PYTHON_PATH rlgames_train.py, the script tries to connect AWS server (omniverse://localhost/NVIDIA), not OMNI_SERVER I set as default server path as above command.
Then the error occurs at check_server function in omni.isaac.core/omni/isaac/core/utils/nucleus.py.

The workaround I found was like this:

  • @ omniisaacgymenvs/cfg/config.yaml
...
asset_root: "omniverse://localhost/MyNVIDIA/Assets/Isaac/2023.1.1"  # None
...
  • @ omniisaacgymenvs/scripts/rlgames_train.py
...
    env = VecEnvRLGames(
        headless=headless,
        sim_device=cfg.device_id,
        enable_livestream=cfg.enable_livestream,
        enable_viewport=enable_viewport or cfg.enable_recording,
        experience=experience,
        asset_root=cfg.asset_root   # add asset_root option
    )
...
  • @ omniisaacgymevns/envs/vec_env_rlgames.py
...
class VecEnvRLGames(VecEnvBase):
    def __init__(self, *args, **kwargs):
        asset_root = kwargs.pop("asset_root")
        super().__init__(*args, **kwargs)
        assert self._simulation_app is not None, "Simulation App should be instantiated first!"
        if asset_root is not None:
            self._simulation_app.set_setting("/persistent/isaac/asset_root/default", asset_root)
...

I referred this thread for the setting: https://forums.developer.nvidia.com/t/nucleus-and-docker/272804/6

Is this the only workaround for ones without internet connection, or is there any more generic approach?

Anyway, thank you very much for the awesome work!