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
Copy file name to clipboardExpand all lines: .azure/gpu-tests-pytorch.yml
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ trigger:
14
14
- "refs/tags/*"
15
15
paths:
16
16
include:
17
-
- ".azure/gpu-tests.yml"
17
+
- ".azure/gpu-tests-pytorch.yml"
18
18
- "examples/run_ddp_examples.sh"
19
19
- "examples/convert_from_pt_to_pl/**"
20
20
- "examples/run_pl_examples.sh"
@@ -39,7 +39,7 @@ pr:
39
39
- "release/*"
40
40
paths:
41
41
include:
42
-
- ".azure/gpu-tests.yml"
42
+
- ".azure/gpu-tests-pytorch.yml"
43
43
- "examples/run_ddp_examples.sh"
44
44
- "examples/convert_from_pt_to_pl/**"
45
45
- "examples/run_pl_examples.sh"
@@ -97,6 +97,7 @@ jobs:
97
97
set -e
98
98
python -c "fname = 'requirements/pytorch/strategies.txt' ; lines = [line for line in open(fname).readlines() if 'horovod' not in line] ; open(fname, 'w').writelines(lines)"
99
99
python -c "fname = 'requirements/pytorch/strategies.txt' ; lines = [line for line in open(fname).readlines() if 'bagua' not in line] ; open(fname, 'w').writelines(lines)"
100
+
python -c "fname = 'requirements/pytorch/strategies.txt' ; lines = [line for line in open(fname).readlines() if 'colossalai' not in line] ; open(fname, 'w').writelines(lines)"
Copy file name to clipboardExpand all lines: .github/workflows/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@
10
10
| Test PyTorch slow | .github/workflows/ci-pytorch-test-slow.yml | Run only slow tests. Slow tests usually need to spawn threads and cannot be speed up or simplified. | CPU |
11
11
| pytorch-lightning (IPUs) | .azure-pipelines/ipu-tests.yml | Run only IPU-specific tests. | IPU |
12
12
| pytorch-lightning (HPUs) | .azure-pipelines/hpu-tests.yml | Run only HPU-specific tests. | HPU |
13
-
| pytorch-lightning (GPUs) | .azure-pipelines/gpu-tests.yml| Run all CPU and GPU-specific tests, standalone, and examples. Each standalone test needs to be run in separate processes to avoid unwanted interactions between test cases. | GPU |
13
+
| pytorch-lightning (GPUs) | .azure-pipelines/gpu-tests-pytorch.yml | Run all CPU and GPU-specific tests, standalone, and examples. Each standalone test needs to be run in separate processes to avoid unwanted interactions between test cases. | GPU |
14
14
| PyTorchLightning.Benchmark | .azure-pipelines/gpu-benchmark.yml | Run speed/memory benchmarks for parity with pure PyTorch. | GPU |
15
15
| test-on-tpus | .github/workflows/ci-pytorch-test-tpu.yml | Run only TPU-specific tests. | TPU |
python -c "fname = 'requirements/pytorch/strategies.txt' ; lines = [line for line in open(fname).readlines() if 'colossalai' not in line] ; open(fname, 'w').writelines(lines)" ; \
python -c "fname = 'requirements/pytorch/strategies.txt' ; lines = [line for line in open(fname).readlines() if 'colossalai' not in line] ; open(fname, 'w').writelines(lines)" ; \
Copy file name to clipboardExpand all lines: docs/source-app/glossary/secrets.rst
+35-62Lines changed: 35 additions & 62 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,55 +4,56 @@
4
4
Encrypted Secrets
5
5
#################
6
6
7
-
Is your App using data or values (for example: API keys or access credentials) that you don't want to expose in your App code? If the answer is yes, you'll want to use Secrets. Secrets are encrypted values that are stored in the Lightning.ai database and are decrypted at runtime.
7
+
Encrypted Secrets allow you to pass private data to your apps, like API keys, access tokens, database passwords, or other credentials, in a secure way without exposing them in your code.
8
+
Secrets provide you with a secure way to store this data in a way that is accessible to Apps so that they can authenticate third-party services/solutions.
8
9
9
10
.. tip::
10
11
For non-sensitive configuration values, we recommend using :ref:`plain-text Environment Variables <environment_variables>`.
11
12
12
-
***************
13
-
What did we do?
14
-
***************
13
+
************
14
+
Add a secret
15
+
************
15
16
16
-
When a Lightning App (App) **runs in the cloud**, a Secret can be exposed to the App using environment variables.
17
-
The value of the Secret is encrypted in the Lightning.ai database, and is only decrypted and accessible to
18
-
LightningFlow (Flow) or LightningWork (Work) processes in the cloud (when you use the ``--cloud`` option running your App).
17
+
Add the secret to your profile on lightning.ai.
18
+
Log in to your lightning.ai account > **Profile** > **Secrets** tab > click the **+New** button.
19
+
Provide a name and value to your secret, for example, name could be "github_api_token".
19
20
20
-
----
21
-
22
-
**********************
23
-
What were we thinking?
24
-
**********************
21
+
.. note::
22
+
Secret names must start with a letter and can only contain letters, numbers, dashes, and periods. The Secret names must comply with `RFC1123 naming conventions <https://www.rfc-editor.org/rfc/rfc1123>`_. The Secret value has no restrictions.
25
23
26
-
Many Apps require access to private data like API keys, access tokens, database passwords, or other credentials. You need to protect this data.
27
-
We developed this feature to provide you with a secure way to store this data in a way that is accessible to Apps so that they can authenticate third-party services/solutions.
1. Add an environment variable to your app to read the secret. For example, add an "api_token" environment variable:
36
38
37
-
#. Log in to your lightning.ai account, go to **Secrets**, and create the Secret (provide a name and value for the secret).
39
+
.. code:: python
38
40
39
-
.. note:: Once you create a Secret, you can bind it to any of your Apps. You do not need to create a new Secret for each App if the Secret value is the same.
41
+
import os
40
42
41
-
#. Prepare an environment variable to use with the Secret in your App.
Secret names must start with a letter and can only contain letters, numbers, dashes, and periods. The Secret names must comply with `RFC1123 naming conventions <https://www.rfc-editor.org/rfc/rfc1123>`_. The Secret value has no restrictions.
85
-
86
-
After creating a Secret named ``my-secret`` with the value ``some-secret-value`` we'll bind it to the environment variable ``MY_APP_SECRET`` within our App. The binding is accomplished by using the ``--secret`` option when running the App from the Lightning CLI.
87
-
88
-
The ``--secret``` option works similar to ``--env``, but instead of providing a value, you provide the name of the Secret that is replaced with with the value that you want to bind to the environment variable:
89
-
90
-
.. code:: bash
91
-
92
-
lightning run app app.py --cloud --secret MY_APP_SECRET=my-secret
93
-
94
-
The environment variables are available in all Flows and Works, and can be accessed as follows:
95
-
96
-
.. code:: python
97
-
98
-
import os
67
+
----
99
68
100
-
print(os.environ["MY_APP_SECRET"])
69
+
******************
70
+
How does this work
71
+
******************
101
72
102
-
This code prints out ``some-secret-value``.
73
+
When a Lightning App (App) **runs in the cloud**, a Secret can be exposed to the App using environment variables.
74
+
The value of the Secret is encrypted in the Lightning.ai database, and is only decrypted and accessible to
75
+
LightningFlow (Flow) or LightningWork (Work) processes in the cloud (when you use the ``--cloud`` option running your App).
0 commit comments