-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add docs on vnc_container bc templates (#908)
Add documentation on vnc_container batch connect templates.
- Loading branch information
Showing
3 changed files
with
171 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
142 changes: 142 additions & 0 deletions
142
source/reference/files/submit-yml/vnc-container-bc-options.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
.. _vnc-container-bc-options: | ||
|
||
Batch Connect VNC Container Options | ||
=================================== | ||
|
||
|
||
All the options in :ref:`vnc-bc-options` apply in addition to what's listed below. | ||
|
||
# @option context [#to_s] :container_path ("vnc_container.sif") the path | ||
# to the container with VNC | ||
# @option context [#to_s] :container_bindpath ("") paths to bind into | ||
# the container with VNC | ||
# @option context [#to_s] :container_module ("singularity") the module | ||
# that loads Singularity or Apptainer with Lmod. Supports versions (i.e. | ||
# apptainer/1.10). If Singularity or Apptainer are installed at a | ||
# system level (i.e., no module loaded to activate), set this to an | ||
# empty string. | ||
# @option context [#to_s] :container_command ("singularity") the | ||
# singularity or apptainer execution command | ||
|
||
.. code-block:: yaml | ||
batch_connect: | ||
template: "vnc_container" | ||
# other 'vnc' or 'basic' options removed for brevity. | ||
container_path: "vnc_container.sif" | ||
container_bindpath: "" | ||
container_module: "singularity" | ||
container_command: "singularity" | ||
.. describe:: container_path (String, "vnc_container.sif") | ||
|
||
The full path to the container image you wish to boot. | ||
|
||
Default | ||
Load the vnc_container.sif image. | ||
|
||
.. code-block:: yaml | ||
container_path: "vnc_container.sif" | ||
Example | ||
Provide an absolute path to a ``vnc_container.sif`` image. | ||
|
||
.. code-block:: yaml | ||
container_path: "/absolute/path/to/my/container/vnc_container.sif" | ||
.. describe:: container_bindpath (String, "") | ||
|
||
A comma seperated list of mountpoints you wish to bind into the container. | ||
|
||
Default | ||
Do not bind any paths into the container. | ||
|
||
.. code-block:: yaml | ||
container_bindpath: "" | ||
Example | ||
Bind /etc, /dev and /usr into the container. | ||
|
||
.. code-block:: yaml | ||
container_bindpath: "/etc,/dev,/usr" | ||
.. describe:: container_module (String, "singularity") | ||
|
||
The module to load before starting the container. | ||
|
||
Default | ||
Load the ``singularity`` module. | ||
|
||
.. code-block:: yaml | ||
container_module: "singularity" | ||
Example | ||
Load the ``singularity/1.1.3`` module. | ||
|
||
.. code-block:: yaml | ||
container_module: "singularity/1.1.3" | ||
.. describe:: container_command (String, "singularity") | ||
|
||
The command used to start the container. | ||
|
||
Default | ||
Use the ``singularity`` command. | ||
|
||
.. code-block:: yaml | ||
container_module: "singularity" | ||
Example | ||
Use the ``apptainer`` command. | ||
|
||
.. code-block:: yaml | ||
container_module: "apptainer" | ||
Starter def file | ||
................ | ||
|
||
This is a ``.def`` file that we've tested this feature with. | ||
You can use this as an example to start and update as required. | ||
|
||
|
||
.. note:: | ||
Note that we're installing turbovnc and websockify *inside* | ||
the container. This is important as all processes will run | ||
inside the contianer and not on the host. | ||
|
||
You can still install these on the host machine, but they will | ||
need to be mounted inside the container as the processes are | ||
expected to be ran *inside* the container. | ||
|
||
.. code-block:: singularity | ||
Bootstrap: docker | ||
From: rockylinux/rockylinux:8 | ||
%environment | ||
PATH=/opt/TurboVNC/bin:$PATH | ||
LANGUAGE="en_US.UTF-8" | ||
LC_ALL="en_US.UTF-8" | ||
LANG="en_US.UTF-8" | ||
%post | ||
dnf install -y epel-release | ||
dnf groupinstall -y xfce | ||
dnf install -y python3-pip xorg-x11-xauth | ||
pip3 install ts | ||
dnf install -y https://yum.osc.edu/ondemand/latest/compute/el8Server/x86_64/python3-websockify-0.10.0-1.el8.noarch.rpm | ||
dnf install -y https://yum.osc.edu/ondemand/latest/compute/el8Server/x86_64/turbovnc-2.2.5-1.el8.x86_64.rpm | ||
dnf clean all | ||
chown root:root /opt/TurboVNC/etc/turbovncserver-security.conf | ||
rm -rf /var/cache/dnf/* |