You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a1ecf65
Browse filesBrowse the repository at this point in the historyBrowse files
The helper generates a one-time VNC password, chooses a random localhost noVNC port, and does not expose the VNC server port by default. It prints the noVNC URL and password before starting the container.
27
+
Run it with the default NERSC-oriented YAML config:
The helper generates a one-time VNC password, chooses a random localhost noVNC port, and does not expose the VNC server port by default. It prints the noVNC URL and password before starting the container. A shell version is also available at `scripts/run-vnc-novnc.sh`.
28
34
29
35
See [RUN_VNC_NOVNC.md](RUN_VNC_NOVNC.md) for full usage details.
Copy file name to clipboardExpand all lines: RUN_VNC_NOVNC.md
+90-13Lines changed: 90 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
# Using `run-vnc-novnc.sh`
1
+
# Using the VNC/noVNC Helpers
2
2
3
-
`scripts/run-vnc-novnc.sh`starts the Debian 12 VNC/noVNC desktop image with safer defaults for interactive use on NERSC systems, especially from Jupyter.
3
+
`scripts/run-vnc-novnc.sh`and `scripts/run-vnc-novnc.py` start the Debian 12 VNC/noVNC desktop image with safer defaults for interactive use on NERSC systems, especially from Jupyter. The Python helper has the same default behavior as the shell helper and adds command-line options for bind mounts, environment passthrough, user namespace settings, and extra `podman-hpc` arguments.
4
4
5
5
## What It Does
6
6
@@ -23,7 +23,13 @@ Inside the container, the VNC server listens on `VNC_PORT` and noVNC listens on
The included `scripts/run-vnc-novnc.yaml` uses `--userns=keep-id`, `--group-add=keep-groups`, and bind mounts `$HOME`, `$SCRATCH`, and `$CFS` into the same paths inside the container. Environment variables in YAML strings are expanded on the host when the script starts.
79
+
80
+
YAML keys use the long option names with underscores instead of dashes. For example:
81
+
82
+
```yaml
83
+
userns: keep-id
84
+
keep_groups: true
85
+
86
+
volume:
87
+
- "${HOME}:${HOME}:rw"
88
+
- "${SCRATCH}:${SCRATCH}:rw"
89
+
- "${CFS}:${CFS}:rw"
90
+
```
91
+
92
+
Precedence is: built-in defaults, YAML config, environment variables, then command-line arguments. Repeated list options such as `volume`, `mount`, `env`, `group_add`, and `extra_podman_args` are initialized from YAML, and additional command-line occurrences are appended.
93
+
68
94
Common settings:
69
95
70
96
| Variable | Default | Purpose |
@@ -77,6 +103,21 @@ Common settings:
77
103
| `EXPOSE_VNC` | `0` | Set to `1` to also publish the raw VNC server port. |
78
104
| `VNC_PASSWORD_LENGTH` | `8` | Length of the generated one-time VNC password. |
79
105
106
+
Python helper container options:
107
+
108
+
| Option | Purpose |
109
+
| --- | --- |
110
+
| `-v`, `--volume HOST:CONTAINER[:OPTIONS]` | Add a bind mount or volume spec. May be repeated. |
111
+
| `--mount SPEC` | Add a Podman `--mount` spec. May be repeated. |
112
+
| `-e`, `--env NAME[=VALUE]` | Pass an environment variable into the container. May be repeated. |
113
+
| `--config FILE` | Read default values from a YAML config file. |
114
+
| `--userns=keep-id` | Pass `--userns=keep-id` to `podman-hpc`. |
115
+
| `--userns-keep-id` | Shorthand for `--userns=keep-id`. |
116
+
| `--group-add=keep-groups` | Pass `--group-add=keep-groups` to `podman-hpc`. |
117
+
| `--keep-groups` | Shorthand for `--group-add=keep-groups`. |
118
+
| `--dry-run` | Print the generated command without running the container. |
119
+
| `--` | Pass following arguments directly to `podman-hpc run` before the image name. |
0 commit comments