Using code envs with containerized execution¶
Container-based execution is compatible with managed code environments for:
Python recipes
R recipes
Custom in-memory machine learning models
Deep learning models
Python notebooks
R notebooks
To make a code environment usable for containerized execution, you must select the containerized execution configuration(s) for which the code environment Docker image must be available. This setting is configured in the “Containerized execution” tab of the code env settings.
Warning
Container-based execution is not compatible with:
non-managed code environments, i.e. those that have deployment type “Non-managed path” or “Named external Conda env”
custom python interpreter from
PATHadditional
PYTHONPATHentries.custom packages manually added to DSS’ builtin environment
Code environment resources directory¶
Managed code environment resources directory offers 4 modes for containerized execution:
Run resources initialization script: call the resources initialization script from within the container at image build time.
Copy resources from local code environment: copy the resources directory from the local code environment into the docker image (using the COPY docker instruction). This option avoids re-downloading the resources.
Copy resources from local code environment, then run resources initialization script: first copy the resources directory from the local code environment into the docker image, then call the resources initialization script from within the container at image build time. Use this when you need both manually uploaded resources and init-time setup.
None: no resources directory in containerized execution.
Updating code envs¶
Update a code env from the code env administration page. This causes corresponding Docker images to be built for the code env (one on top of each base image from the selected container configurations). Each time you use this code env and one of the selected container configurations to run a recipe or model, then the corresponding Docker image will be used.
Warning
After each upgrade of DSS, you must rebuild all base images and then all code env images.
You can rebuild code env images by running ./bin/dssadmin build-container-exec-code-env-images --all.
Likewise, adding a new container execution configuration, or changing which image build configuration it uses, does not automatically rebuild all code environments that are set to be available for “All container exec configurations”.