Skip to content

Commit 163506c

Browse files
Fixed warnings for snippet files
1 parent b0e53a7 commit 163506c

File tree

17 files changed

+54
-54
lines changed

17 files changed

+54
-54
lines changed

docs/Researcher/best-practices/convert-to-unattended.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Unattended workloads are a good fit for long-duration runs, or sets of smaller h
1111

1212
### Docker Image
1313

14-
A docker container is based on a docker image. Some Researchers use generic images such as ones provided by Nvidia, for example: [NVIDIA NGC TensorFlow](https://ngc.nvidia.com/catalog/containers/nvidia:tensorflow){target=_blank}.
14+
A docker container is based on a docker image. Some Researchers use generic images such as ones provided by Nvidia, for example: [NVIDIA NGC TensorFlow](https://ngc.nvidia.com/catalog/containers/nvidia:tensorflow){target=_blank}.
1515
Others, use generic images as the __base__ image to a more customized image using [Dockerfiles](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/){target=_blank}.
1616

1717
Realizing that Researchers are not always proficient with building docker files, as a best practice, you will want to:
@@ -26,17 +26,17 @@ You will want to minimize the cycle of code change-and-run. There are a couple o
2626

2727
1. Code resides on the network file storage. This way you can change the code and immediately run the Job. The Job picks up the new files from the network.
2828
2. Use the `runai submit` flag `--git-sync`. The flag allows the Researcher to provide details of a Git repository. The repository will be automatically cloned into a specified directory when the container starts.
29-
3. The code can be embedded within the image. In this case, you will want to create an automatic CI/CD process, which packages the code into a modified image.
29+
3. The code can be embedded within the image. In this case, you will want to create an automatic CI/CD process, which packages the code into a modified image.
3030

31-
The document below assumes option #1.
31+
The document below assumes option #1.
3232

3333
### Create a Startup Script
3434

3535
Gather the commands you ran inside the interactive Job into a single script. The script will be provided with the command-line at the start of the unattended execution (see the section _running the job_ below). This script should be kept next to your code, on a shared network drive (e.g. _/nfs/john_).
3636

3737
An example of a common startup script __start.sh__:
3838

39-
```
39+
```
4040
pip install -r requirements.txt
4141
...
4242
python training.py
@@ -97,7 +97,7 @@ Please refer to [Command-Line Interface, runai submit](../cli-reference/runai-su
9797

9898
### Use CLI Policies
9999

100-
Different run configurations may vary significantly and can be tedious to be written each time on the command-line. To make life easier, our CLI offers a way to set administrator policies for these configurations and use pre-configured configuration when submitting a Workload. Please refer to [Configure Command-Line Interface Policies](../../admin/workloads/policies.md).
100+
Different run configurations may vary significantly and can be tedious to be written each time on the command-line. To make life easier, our CLI offers a way to set administrator policies for these configurations and use pre-configured configuration when submitting a Workload. Please refer to [Configure Command-Line Interface Policies](../../admin/workloads/policies/policies.md).
101101

102102
## Attached Files
103103

docs/Researcher/cli-reference/runai-submit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,4 +453,4 @@ Note that the submit call may use a *policy* to provide defaults to any of the a
453453
## See Also
454454
455455
* See any of the Quickstart documents [here:](../Walkthroughs/quickstart-overview.md).
456-
* See [policy configuration](../../admin/workloads/policies.md) for a description on how policies work.
456+
* See [policy configuration](../../admin/workloads/policies/policies.md) for a description on how policies work.

docs/Researcher/user-interface/workspaces/create/workspace-v2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Use the *Jobs form* below if you have not enabled the *Workloads* feature.
2424
A template contains a set of predefined building blocks as well as additional configurations which allow the user to immediately create a templated-based workspace.
2525

2626
4. Enter a name for your workspace and press *Continue*.
27-
5. Select an environment from the tiles. If your environment is not listed, use the *Search environments* box to find it or press [*New environment*](workspaces/create/create-env.md) to create a new environment. Press to create an environment if needed. In the *Set the connection for your tool(s)*, enter the URL of the tool if a custom URL has been enabled in the selected environment. Use the *Private* toggle to lock access to the tool to only the creator of the environment.
27+
5. Select an environment from the tiles. If your environment is not listed, use the *Search environments* box to find it or press [*New environment*](../create/create-env.md) to create a new environment. Press to create an environment if needed. In the *Set the connection for your tool(s)*, enter the URL of the tool if a custom URL has been enabled in the selected environment. Use the *Private* toggle to lock access to the tool to only the creator of the environment.
2828

2929
In the *Runtime Settings*:
3030

docs/admin/admin-ui-setup/templates.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ To create a template:
1616
1. In the left menu, press *Templates*, then press *New Template*.
1717
2. In the *Scope* pane, select a *Scope*.
1818
3. In the *Template Name* pane, enter a name for the template.
19-
3. Select an environment from the tiles. If your environment is not listed, use the *Search environments* box to find it or press [*New environment*](workspaces/create/create-env.md) to create a new environment. Press to create an environment if needed. In the *Set the connection for your tool(s)*, enter the URL of the tool if a custom URL has been enabled in the selected environment. Use the *Private* toggle to lock access to the tool to only the creator of the environment.
19+
4. Select an environment from the tiles. If your environment is not listed, use the *Search environments* box to find it or press [*New environment*](../../Researcher/user-interface/workspaces/create/create-env.md) to create a new environment. Press to create an environment if needed. In the *Set the connection for your tool(s)*, enter the URL of the tool if a custom URL has been enabled in the selected environment. Use the *Private* toggle to lock access to the tool to only the creator of the environment.
2020

2121
In the *Runtime Settings*:
2222

2323
1. Press *Commands and Arguments* to add special commands and arguments to your environment selection.
2424
2. Press *Environment variable* to add an environment variable. Press again if you need more environment variables.
2525

26-
4. In the *Compute resource* pane, select a compute resource. Use the *Search compute resources* if you do not see your resource listed. Press *New compute resource* to add a new compute resource to the system. Press *More settings* to add a node type (node affinity) to the compute resource selected.
27-
5. (Optional) In the *Volume* pane, press *+volume* to add a new volume to the template.
26+
5. In the *Compute resource* pane, select a compute resource. Use the *Search compute resources* if you do not see your resource listed. Press *New compute resource* to add a new compute resource to the system. Press *More settings* to add a node type (node affinity) to the compute resource selected.
27+
6. (Optional) In the *Volume* pane, press *+volume* to add a new volume to the template.
2828

2929
From the drop down menus select:
3030
* Storage class
@@ -34,11 +34,11 @@ To create a template:
3434

3535
Set the *Volume target location*, then select from either a *Persistent* volume or an *Ephemeral* volume.
3636

37-
6. In the *Data sources* pane, select a data source. Press *New data source* to add a new data source to the system.
38-
7. In the *General* pane, choose to add the following:
37+
7. In the *Data sources* pane, select a data source. Press *New data source* to add a new data source to the system.
38+
8. In the *General* pane, choose to add the following:
3939

4040
* Auto-deletion—the time after which a workload that has completed or failed will be deleted. Press *+Auto-deletion* then configure the time in days, hours, minutes, and seconds.
4141
* Annotation—press *+Annottion* then enter a name and a value. You can add multiple annotations by pressing the *+Annottion*.
4242
* Label—press *+Label* then enter a name and a value. You can add multiple labels by pressing the *+Label*.
4343

44-
8. Press *Create template* when your configuration is complete.
44+
9. Press *Create template* when your configuration is complete.

docs/admin/runai-setup/cluster-setup/cluster-prerequisites.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ For Run:ai on OpenShift to run with PSA `restricted` policy:
7373
pod-security.kubernetes.io/enforce=privileged
7474
pod-security.kubernetes.io/warn=privileged
7575
```
76-
2. The workloads submitted through Run:ai should comply with the restrictions of PSA `restricted` policy, which are dropping all Linux capabilities and setting `runAsNonRoot` to `true`. This can be done and enforced using [Policies](../../workloads/policies.md).
76+
2. The workloads submitted through Run:ai should comply with the restrictions of PSA `restricted` policy, which are dropping all Linux capabilities and setting `runAsNonRoot` to `true`. This can be done and enforced using [Policies](../../workloads/policies/policies.md).
7777

7878
### NVIDIA
7979

docs/admin/runai-setup/config/non-root-containers.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@ The identity of the user in the container determines its access to resources. Fo
55

66
## The Default: Root Access
77

8-
In docker, as well as in Kubernetes, the default for running containers is running as _root_. The implication of running as root is that processes running within the container have enough permissions to change anything in the container, and if propagated to network resources - can have permissions outside the container as well.
8+
In docker, as well as in Kubernetes, the default for running containers is running as _root_. The implication of running as root is that processes running within the container have enough permissions to change anything in the container, and if propagated to network resources - can have permissions outside the container as well.
99

10-
This gives a lot of power to the Researcher but does not sit well with modern security standards of enterprise security.
10+
This gives a lot of power to the Researcher but does not sit well with modern security standards of enterprise security.
1111

1212
By default, if you run:
1313

1414
```
1515
runai submit -i ubuntu --attach --interactive -- bash
1616
```
17-
then run `id`, you will see the **root** user.
17+
then run `id`, you will see the **root** user.
1818

1919
## Use Run:ai flags to limit root access
2020

2121
There are two [runai submit](../../../Researcher/cli-reference/runai-submit.md) flags which control user identity at the Researcher level:
2222

23-
* The flag `--run-as-user` starts the container with a specific user. The user is the current Linux user (see below for other behaviors if used in conjunction with Single sign-on).
24-
* The flag `--prevent-privilege-escalation` prevents the container from elevating its own privileges into `root` (e.g. running `sudo` or changing system files.).
23+
* The flag `--run-as-user` starts the container with a specific user. The user is the current Linux user (see below for other behaviors if used in conjunction with Single sign-on).
24+
* The flag `--prevent-privilege-escalation` prevents the container from elevating its own privileges into `root` (e.g. running `sudo` or changing system files.).
2525

2626
Equivalent flags exist in the Researcher User Interface.
2727
### Run as Current User
@@ -44,16 +44,16 @@ runai submit -i ubuntu --attach --interactive --run-as-user \
4444
--prevent-privilege-escalation -- bash
4545
```
4646

47-
then verify that you cannot run `su` to become root within the container.
47+
then verify that you cannot run `su` to become root within the container.
4848

4949

5050
### Setting a Cluster-Wide Default
5151

5252

53-
The two flags are voluntary. They are not enforced by the system. It is however possible to enforce them using [Policies](../../workloads/policies.md). Polices allow an Administrator to force compliance on both the User Interface and Command-line interface.
53+
The two flags are voluntary. They are not enforced by the system. It is however possible to enforce them using [Policies](../../workloads/policies/policies.md). Polices allow an Administrator to force compliance on both the User Interface and Command-line interface.
5454

5555

56-
## Passing user identity
56+
## Passing user identity
5757
### Passing user identity from Identity Provider
5858

5959
A best practice is to store the user identifier (UID) and the group identifier (GID) in the organization's directory. Run:ai allows you to pass these values to the container and use them as the container identity.
@@ -67,7 +67,7 @@ To perform this, you must:
6767
Running `id` should show the identifier from the directory.
6868

6969

70-
### Passing user identity explicitly via the Researcher UI
70+
### Passing user identity explicitly via the Researcher UI
7171

7272
Via the Researcher User Interface, it is possible to explicitly provide the user id and group id:
7373

@@ -78,7 +78,7 @@ Via the Researcher User Interface, it is possible to explicitly provide the user
7878

7979

8080
Run:ai supports OpenShift as a Kubernetes platform. In OpenShift the system will provide a __random__ UID to containers. The flags `--run-as-user` and `--prevent-privilege-escalation` are disabled on OpenShift.
81-
It is possible to achieve a similar effect on Kubernetes systems that are not OpenShift. A leading tool is [Gatekeeper](https://open-policy-agent.github.io/gatekeeper/website/docs/){target=_blank}. Gatekeeper similarly enforces non-root on containers at the system level.
81+
It is possible to achieve a similar effect on Kubernetes systems that are not OpenShift. A leading tool is [Gatekeeper](https://open-policy-agent.github.io/gatekeeper/website/docs/){target=_blank}. Gatekeeper similarly enforces non-root on containers at the system level.
8282

8383

8484
## Creating a Temporary Home Directory
@@ -99,7 +99,7 @@ I have no name!@job-0-0-0:/$
9999
Adding home directories to an image per user is not a viable solution. To overcome this, Run:ai provides an additional flag `--create-home-dir`. Adding this flag creates a temporary home directory for the user within the container.
100100
101101
!!! Notes
102-
* Data saved in this directory will not be saved when the container exits.
102+
* Data saved in this directory will not be saved when the container exits.
103103
* This flag is set by __default to true__ when the `--run-as-user` flag is used, and false if not.
104104
105105

docs/admin/workloads/policies/policies.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ When submitting a workload that is affected by this policy, the created containe
288288
the namespace where the workload runs.
289289

290290
!!! Note
291-
Run:ai provides a secret propagation mechanism from the `runai` namespace to all project namespaces. For further information see [secret propagation](secrets.md#secrets-and-projects)
291+
Run:ai provides a secret propagation mechanism from the `runai` namespace to all project namespaces. For further information see [secret propagation](../secrets.md#secrets-and-projects).
292292

293293
### Prevent Data Storage on the Node
294294

@@ -362,7 +362,7 @@ To access _project-specific_ policies, replace the `-n runai` parameter with the
362362

363363
## See Also
364364

365-
* For creating workloads based on policies, see the Run:ai [submitting workloads](../../developer/cluster-api/workload-overview-dev.md)
365+
* For creating workloads based on policies, see the Run:ai [submitting workloads](../../../developer/cluster-api/workload-overview-dev.md)
366366

367367
**API LINK HERE!!!!!!!!**
368368

docs/admin/workloads/policies/training-policy.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ To create a policy:
4949
!!! Note
5050
After saving, the form will wait for the policy to sync with the cluster.
5151

52-
--8<-- "../docs/snippets/snippets-policies.md:1:170"
52+
--8<-- "snippets-policies.md:1:170"
5353

5454
#### Training
5555

56-
--8<-- "../docs/snippets/snippets-policies.md:172:775"
56+
--8<-- "snippets-policies.md:172:775"
5757

5858
#### Training
5959

60-
--8<-- "../docs/snippets/snippets-policies.md:777:843"
60+
--8<-- "snippets-policies.md:777:843"

docs/admin/workloads/secrets.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
## Kubernetes Secrets
44

5-
Sometimes you want to use sensitive information within your code. For example passwords, OAuth tokens, or ssh keys. The best practice for saving such information in Kubernetes is via __Kubernetes Secrets__. Kubernetes Secrets let you store and manage sensitive information. Access to secrets is limited via configuration.
5+
Sometimes you want to use sensitive information within your code. For example passwords, OAuth tokens, or ssh keys. The best practice for saving such information in Kubernetes is via **Kubernetes Secrets**. Kubernetes Secrets let you store and manage sensitive information. Access to secrets is limited via configuration.
66

7-
A Kubernetes secret may hold multiple __key - value__ pairs.
7+
A Kubernetes secret may hold multiple **key - value** pairs.
88

99
## Using Secrets in Run:ai Workloads
1010

11-
Our goal is to provide Run:ai Workloads with secrets as input in a secure way. Using the Run:ai command line, you will be able to pass a reference to a secret that already exists in Kubernetes.
11+
Our goal is to provide Run:ai Workloads with secrets as input in a secure way. Using the Run:ai command line, you will be able to pass a reference to a secret that already exists in Kubernetes.
1212

1313
## Creating a secret
1414

@@ -74,4 +74,4 @@ runai-adm remove secret <secret name> --cluster-wide
7474

7575
## Secrets and Policies
7676

77-
A Secret can be set at the policy level. For additional information see [policies guide](policies.md)
77+
A Secret can be set at the policy level. For additional information see [policies guide](../workloads/policies/policies.md).

docs/admin/workloads/submitting-workloads.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ To submit a workload using the UI:
9595

9696
## Workload Policies
9797

98-
As an administrator, you can set *Policies* on Workloads. Policies allow administrators to *impose restrictions* and set *default values* for Researcher Workloads. For more information see [Workload Policies](policies.md).
98+
As an administrator, you can set *Policies* on Workloads. Policies allow administrators to *impose restrictions* and set *default values* for Researcher Workloads. For more information see [Workload Policies](../workloads/policies/policies.md).

0 commit comments

Comments
 (0)