|
| 1 | +OpenShell MXC Windows inference demos |
| 2 | +==================================== |
| 3 | + |
| 4 | +These two demos exercise the full gateway -> MXC processContainer path: |
| 5 | + |
| 6 | + Local inference (Hello World) |
| 7 | + powershell -NoProfile -ExecutionPolicy Bypass -File .\run-ollama-test.ps1 |
| 8 | + |
| 9 | + Cloud inference (T1) |
| 10 | + $env:NV_API_KEY = "nvapi-..." |
| 11 | + powershell -NoProfile -ExecutionPolicy Bypass -File .\run-inference-test.ps1 |
| 12 | + |
| 13 | +Prerequisites |
| 14 | +------------- |
| 15 | + |
| 16 | + - Windows 11 build 26300.8553 or newer with MXC processContainer support. |
| 17 | + - openshell-gateway.exe and openshell.exe beside these files, or explicit |
| 18 | + -GatewayPath and -CliPath arguments. |
| 19 | + - wxc-exec.exe beside these files, on PATH, named by |
| 20 | + OPENSHELL_WXC_EXEC_PATH, or passed with -WxcExecPath. |
| 21 | + - Local demo: an Ollama-compatible service on 127.0.0.1:11434 by default. |
| 22 | + Override -OllamaHost, -OllamaPort, and -Model when needed. |
| 23 | + - Cloud demo: NV_API_KEY and outbound HTTPS to integrate.api.nvidia.com. |
| 24 | + |
| 25 | +The runners use a unique temporary share directory and an available loopback |
| 26 | +gateway port for each run. They never require C:\mxc-kit, C:\work, a fixed |
| 27 | +gateway port, or edits to the checked-in templates. Missing prerequisites fail |
| 28 | +before sandbox creation with a diagnostic naming the parameter or environment |
| 29 | +variable that can supply them. |
| 30 | + |
| 31 | +Security model |
| 32 | +-------------- |
| 33 | + |
| 34 | +Both demos use the fail-closed process_container backend. Their rendered policy |
| 35 | +grants only the per-run share and the one requested endpoint, and no broad |
| 36 | +AppContainer network capability is enabled. Cloud traffic traverses OpenShell's |
| 37 | +enforcing CONNECT proxy. For local Ollama only, curl bypasses proxy variables |
| 38 | +for the requested loopback hostname because the proxy's SSRF defense rejects |
| 39 | +all loopback destinations; MXC still limits direct traffic to host loopback. This |
| 40 | +inherits the driver's documented limitation that governed MXC sandboxes can |
| 41 | +reach other host-loopback ports and must not be treated as loopback-service |
| 42 | +isolation. The cloud key is passed with `--env-from NV_API_KEY`, is not placed in |
| 43 | +argv or written to the results directory, and is never printed. |
| 44 | + |
| 45 | +Each run leaves a results-* directory containing the rendered TOML and policy, |
| 46 | +gateway logs, response artifacts, and summary.txt. The script exits 0 only when |
| 47 | +the sandbox creates successfully and the expected inference response is |
| 48 | +observed. Use -KeepArtifacts to retain the temporary share for debugging. |
0 commit comments