fix: enable MotrixSim Vulkan rendering on A800
This commit is contained in:
parent
08598438c0
commit
93275ec827
@ -174,7 +174,8 @@ spec:
|
||||
- name: runtime-gate
|
||||
image: __WORKER_IMAGE__
|
||||
imagePullPolicy: IfNotPresent
|
||||
command: [real2sim-runtime-gate, --mode, bootstrap]
|
||||
command: [/bin/bash, -lc]
|
||||
args: ["install -d -m 700 /tmp/xdg-runtime && exec real2sim-runtime-gate --mode bootstrap"]
|
||||
env: &worker-env
|
||||
- {name: REAL2SIM_PLATFORM_CONFIG, value: /etc/real2sim/config.toml}
|
||||
- {name: REAL2SIM_WORKER_MODE, value: worker}
|
||||
@ -186,7 +187,9 @@ spec:
|
||||
- {name: REAL2SIM_FFMPEG_BIN, value: /usr/bin/ffmpeg}
|
||||
- {name: MUJOCO_GL, value: egl}
|
||||
- {name: PYOPENGL_PLATFORM, value: egl}
|
||||
- {name: NVIDIA_DRIVER_CAPABILITIES, value: "compute,utility,graphics"}
|
||||
- {name: NVIDIA_DRIVER_CAPABILITIES, value: all}
|
||||
- {name: WGPU_BACKEND, value: vulkan}
|
||||
- {name: XDG_RUNTIME_DIR, value: /tmp/xdg-runtime}
|
||||
- {name: HF_HOME, value: /var/lib/real2sim-poc/cache/huggingface}
|
||||
- {name: HF_HUB_DISABLE_XET, value: "1"}
|
||||
- {name: HOME, value: /var/lib/real2sim-poc/cache/home}
|
||||
|
||||
@ -88,6 +88,12 @@ RUN git clone --filter=blob:none --no-checkout https://github.com/Motphys/motrix
|
||||
ln -s /opt/conda/bin/python /opt/real2sim_paper_runtime/envs/anysplat/bin/python && \
|
||||
ln -s /opt/conda/bin/pip /opt/real2sim_paper_runtime/envs/anysplat/bin/pip
|
||||
|
||||
# Keep the stable CUDA/ML dependency layers reusable when only the MotrixSim
|
||||
# graphics runtime changes.
|
||||
RUN apt-get -o Acquire::Retries=5 update && \
|
||||
apt-get -o Acquire::Retries=5 install -y --no-install-recommends libvulkan1 && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=node-runtime /usr/local/bin/node /usr/local/bin/node
|
||||
RUN test "$(node --version)" = "v20.19.2"
|
||||
|
||||
@ -111,7 +117,7 @@ ENV REAL2SIM_PLATFORM_BUILD_ID=${BUILD_ID} \
|
||||
REAL2SIM_FFMPEG_BIN=/usr/bin/ffmpeg \
|
||||
MUJOCO_GL=egl \
|
||||
PYOPENGL_PLATFORM=egl \
|
||||
NVIDIA_DRIVER_CAPABILITIES=compute,utility,graphics
|
||||
NVIDIA_DRIVER_CAPABILITIES=all
|
||||
|
||||
RUN useradd --uid 10001 --create-home --shell /usr/sbin/nologin real2sim && \
|
||||
chown -R 10001:10001 /app
|
||||
|
||||
@ -219,6 +219,7 @@ def _simulator_probe() -> dict[str, Any]:
|
||||
motrix_model = load_model(str(scene_path))
|
||||
motrix_data = SceneData(motrix_model)
|
||||
motrix_model.cameras[0].set_render_target("image", 160, 120)
|
||||
motrix_pixels = None
|
||||
with RenderApp(headless=True) as motrix_renderer:
|
||||
motrix_renderer.launch(motrix_model)
|
||||
for _ in range(8):
|
||||
@ -229,6 +230,8 @@ def _simulator_probe() -> dict[str, Any]:
|
||||
if motrix_image is None:
|
||||
raise RuntimeError("MotrixSim headless renderer did not return an image")
|
||||
motrix_pixels = np.asarray(motrix_image.pixels, dtype=np.uint8)[:, :, :3]
|
||||
if motrix_pixels is None:
|
||||
raise RuntimeError("MotrixSim headless renderer exited before returning pixels")
|
||||
motrix_mean = float(motrix_pixels.mean())
|
||||
motrix_std = float(motrix_pixels.std())
|
||||
motrix_nonzero = int(np.count_nonzero(motrix_pixels))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user