Isaac Sim Setup with Docker: Default Python App Launch Failure

Hello,

I am tring to make a isaac sim runtime within docker and make it possbile starting with a default python app, then the user can connect the app by streaming client.
Below is my docker configurations by docker-compose, and I’d like to start livestream.py after docker compose up.
However, it does not wrok. Can you please give me some guidance to overcome the issue?

Thank you

docker-compose.yml

version: '3.8'
services:
  isaac-sim:
    container_name: isaac-sim
    image: nvcr.io/nvidia/isaac-sim:2023.1.1
    environment:
      - ACCEPT_EULA=Y
      - PRIVACY_CONSENT=Y
    volumes:
      - ./store/cache/kit:/isaac-sim/kit/cache:rw
      - ./store/cache/ov:/root/.cache/ov:rw
      - ./store/cache/pip:/root/.cache/pip:rw
      - ./store/cache/glcache:/root/.cache/nvidia/GLCache:rw
      - ./store/cache/computecache:/root/.nv/ComputeCache:rw
      - ./store/logs:/root/.nvidia-omniverse/logs:rw
      - ./store/data:/root/.local/share/ov/data:rw
      - ./store/documents:/root/Documents:rw
      - ./tmapps:/root/tmapps
    command: ["./python.sh", "/root/tmapps/livestream.py"]
    deploy:
      resources:
        reservations:
          devices:
          - driver: nvidia
            count: all
            capabilities: [gpu]
    network_mode: host

livestream.py

from omni.isaac.kit import SimulationApp
from datetime import datetime

CONFIG = {
    "width": 1280,
    "height": 720,
    "window_width": 1920,
    "window_height": 1080,
    "headless": True,
    "renderer": "RayTracedLighting",
    "display_options": 3286,  # Set display options to show default grid
}


kit = SimulationApp(launch_config=CONFIG)
from omni.isaac.core.utils.extensions import enable_extension

kit.set_setting("/app/window/drawMouse", True)
kit.set_setting("/app/livestream/proto", "ws")
kit.set_setting("/app/livestream/websocket/framerate_limit", 120)
kit.set_setting("/ngx/enabled", False)

enable_extension("omni.kit.livestream.native")

while kit._app.is_running() and not kit.is_exiting():
    current_date = datetime.now()
    print(current_date.isoformat())
    kit.update()

kit.close()

Regards,
Darien

Hi @darien.wei - At what step from this documentation you are getting error?
https://docs.omniverse.nvidia.com/isaacsim/latest/installation/install_container.html

Hello rthaker,

The document works fine. However, I encountered an issue with starting up a default Python app after Docker is running.

In the code sample provided in livestream.py, there is a print statement[Ref.1] for a time string to verify if livestream.py executes after Docker is running. Unfortunately, I cannot see the time printed[Ref.2].

When I run this code in desktop mode, it behaves as expected[Ref.3]

My question is: how can I ensure that livestream.py is executed after the Isaac Sim Docker is running?

Thank you.

[Ref.1]
print_time_string

[Ref.2]

[Ref.3]

cd ~/.local/share/ov/pkg/isaac_sim-2023.1.1
./python.sh standalone_examples/api/omni.isaac.kit/livestream.py

Hi rthaker,

I’ve identified a solution to address the issue. Instead of using the command parameter, I’ve switched to using entrypoint, which has resolved the problem.

Here’s the updated configuration:

entrypoint: ["bash", "./python.sh", "/root/tmapps/livestream.py"]

Now, it works as expected.
Thank you for your assistance.

Best regards,
Darien

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.