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: articles/machine-learning/prompt-flow/how-to-customize-environment-runtime.md
+8-15Lines changed: 8 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,14 +43,14 @@ Open the `requirements.txt` file and add your extra packages and specific versio
43
43
44
44
```
45
45
###### Requirements with Version Specifiers ######
46
-
langchain == 0.0.149 # Version Matching. Must be version 0.6.1
46
+
langchain == 0.0.149 # Version Matching. Must be version 0.0.149
47
47
keyring >= 4.1.1 # Minimum version 4.1.1
48
48
coverage != 3.5 # Version Exclusion. Anything except version 3.5
49
49
Mopidy-Dirble ~= 1.1 # Compatible release. Same as >= 1.1, == 1.*
50
50
<path_to_local_package> # reference to local pip wheel package
51
51
```
52
52
53
-
You can obtain the path of local packages using `ls > requirements.txt`.
53
+
For more information about structuring the `requirements.txt` file, see [Requirements file format](https://pip.pypa.io/en/stable/reference/requirements-file-format/) in the pip documentation.
54
54
55
55
#### Define the `Dockerfile`
56
56
@@ -81,7 +81,8 @@ In your local compute, you can use the CLI (v2) to create a customized environme
81
81
>Prompt flow is **not supported** in the project workspace which was created with a workspace hub. The workspace hub is a private preview feature.
82
82
83
83
```shell
84
-
az login(optional)
84
+
az login # if not already authenticated
85
+
85
86
az account set --subscription <subscription ID>
86
87
az configure --defaults workspace=<Azure Machine Learning workspace name> group=<resource group>
87
88
```
@@ -95,16 +96,15 @@ build:
95
96
path: .
96
97
```
97
98
98
-
#### Run CLI command to create an environment
99
+
#### Create an environment
99
100
100
-
```bash
101
+
```shell
101
102
cd image_build
102
-
az login(optional)
103
103
az ml environment create -f environment.yaml --subscription <sub-id> -g <resource-group> -w <workspace>
104
104
```
105
105
106
106
> [!NOTE]
107
-
> Building the image may take several minutes.
107
+
> Building the environment image may take several minutes.
108
108
109
109
Go to your workspace UI page, then go to the **environment** page, and locate the custom environment you created. You can now use it to create a compute instance runtime in your prompt flow. To learn more, see [Create compute instance runtime in UI](how-to-create-manage-runtime.md#create-a-compute-instance-runtime-on-a-runtime-page).
110
110
@@ -138,11 +138,9 @@ A compute instance runtime is a custom application that runs on a compute instan
138
138
### Create custom application as prompt flow compute instance runtime via SDK v2
139
139
140
140
```python
141
-
# import required libraries
142
141
import os
143
142
from azure.ai.ml import MLClient
144
-
from azure.ai.ml.entities import WorkspaceConnection
145
-
# Import required libraries
143
+
from azure.ai.ml.entities import ComputeInstance, CustomApplications, EndpointsSettings, ImageSettings, VolumeSettings, WorkspaceConnection
146
144
from azure.identity import DefaultAzureCredential, InteractiveBrowserCredential
147
145
148
146
try:
@@ -153,19 +151,14 @@ except Exception as ex:
153
151
# Fall back to InteractiveBrowserCredential in case DefaultAzureCredential not work
154
152
credential = InteractiveBrowserCredential()
155
153
156
-
from azure.ai.ml.entities import ComputeInstance
157
-
from azure.ai.ml.entities import CustomApplications, ImageSettings, EndpointsSettings, VolumeSettings
0 commit comments