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
Alternatively, you can specify a custom Dockerfile. It is simplest to start from one of Azure Machine Learning base images using Docker ```FROM``` command, and then add your own custom steps. Use this approach if you need to install non-Python packages as dependencies.
249
+
You can also specify a custom Dockerfile. It's simplest to start from one of Azure Machine Learning base images using Docker ```FROM``` command, and then add your own custom steps. Use this approach if you need to install non-Python packages as dependencies.
250
250
251
251
```python
252
252
# Specify docker steps as a string. Alternatively, load the string from a file.
> If you specify `environment.python.user_managed_dependencies=False` while you're using a custom Docker image, then the service will build a Conda environment within the image. It will execute the run in that environment instead of using any Python libraries that you installed on the base image. Set the parameter to `True` to use your own installed packages.
263
+
### Use user-managed dependencies
264
+
265
+
In some situations, your custom base image may already contain a Python environment with packages that you want to use.
266
+
267
+
By default, Azure Machine Learning service will build a Conda environment with dependencies you specified, and will execute the run in that environment instead of using any Python libraries that you installed on the base image.
268
+
269
+
To use your own installed packages, set the parameter `Environment.python.user_managed_dependencies = True`. Ensure that the base image contains a Python interpreter, and has the packages your training script needs.
270
+
271
+
For example, to run in a base Miniconda environment that has NumPy package installed, first specify a Dockerfile with a step to install the package. Then set the user-managed dependencies to `True`.
272
+
273
+
You can also specify a path to a specific Python interpreter within the image, by setting the `Environment.python.interpreter_path` variable.
274
+
275
+
```python
276
+
dockerfile ="""
277
+
FROM mcr.microsoft.com/azureml/base:intelmpi2018.3-ubuntu16.04
0 commit comments