|
139 | 139 | "cell_type": "markdown", |
140 | 140 | "metadata": {}, |
141 | 141 | "source": [ |
142 | | - "### Create Azure File Share\n", |
143 | | - "\n", |
144 | | - "For this example we will create a new File Share with name `batchaisample` under your storage account. This will be used to share the *training script file* and *output file*.\n", |
145 | | - "\n", |
146 | | - "**Note** You don't need to create new file share for every cluster. We are doing this in this sample to simplify resource management for you." |
147 | | - ] |
148 | | - }, |
149 | | - { |
150 | | - "cell_type": "code", |
151 | | - "execution_count": null, |
152 | | - "metadata": {}, |
153 | | - "outputs": [], |
154 | | - "source": [ |
155 | | - "azure_file_share_name = 'batchaisample'\n", |
156 | | - "file_service = FileService(cfg.storage_account_name, cfg.storage_account_key)\n", |
157 | | - "file_service.create_share(azure_file_share_name, fail_on_exist=False)" |
158 | | - ] |
159 | | - }, |
160 | | - { |
161 | | - "cell_type": "markdown", |
162 | | - "metadata": {}, |
163 | | - "source": [ |
164 | | - "### Deploy Sample Script to Azure File Share" |
| 142 | + "### Deploy Sample Script toAzure Blob Container" |
165 | 143 | ] |
166 | 144 | }, |
167 | 145 | { |
168 | 146 | "cell_type": "markdown", |
169 | 147 | "metadata": {}, |
170 | 148 | "source": [ |
171 | | - "We will create a folder on Azure File Share containing a copy of sample script" |
| 149 | + "We will create a folder on Azure Blob Containers containing a copy of sample script" |
172 | 150 | ] |
173 | 151 | }, |
174 | 152 | { |
|
179 | 157 | "source": [ |
180 | 158 | "script_directory = 'tensorflow_samples'\n", |
181 | 159 | "script_to_deploy = 'mnist_replica.py'\n", |
182 | | - "file_service.create_directory(\n", |
183 | | - " azure_file_share_name, script_directory, fail_on_exist=False)\n", |
184 | | - "file_service.create_file_from_path(\n", |
185 | | - " azure_file_share_name, script_directory, script_to_deploy, script_to_deploy)" |
| 160 | + "\n", |
| 161 | + "blob_service.create_blob_from_path(azure_blob_container_name,\n", |
| 162 | + " script_directory + '/' + script_to_deploy, \n", |
| 163 | + " script_to_deploy)" |
186 | 164 | ] |
187 | 165 | }, |
188 | 166 | { |
|
303 | 281 | " input_directories=[\n", |
304 | 282 | " models.InputDirectory(\n", |
305 | 283 | " id='SCRIPT',\n", |
306 | | - " path='$AZ_BATCHAI_JOB_MOUNT_ROOT/{0}/{1}'.format(azure_file_share, script_directory)),\n", |
| 284 | + " path='$AZ_BATCHAI_JOB_MOUNT_ROOT/{0}/{1}'.format(azure_blob, script_directory)),\n", |
307 | 285 | " models.InputDirectory(\n", |
308 | 286 | " id='DATASET',\n", |
309 | 287 | " path='$AZ_BATCHAI_JOB_MOUNT_ROOT/{0}/{1}'.format(azure_blob, mnist_dataset_directory))],\n", |
|
0 commit comments