When you create an Environment, custom images can be made automatically compatible with Domino Jobs and Workspaces when creating an Environment, as explained in Use external images in Domino Environments. This topic explains how to use additional Dockerfile instructions to enable custom images for use when publishing models or hosting web applications.
-
To do this when creating the Environment, select Customize before building.
-
To add this capability to an existing Environment, click Edit Definition in the top right of the Environment’s overview page.
To publish a Domino model API, install uWSGI and Flask as follows:
# Install uWSGI
RUN apt update && apt install -y --no-install-recommends
uwsgi
# clean up
apt-get clean &&
rm -rf /var/lib/apt/lists/*
# Install Flask
RUN pip install --no-cache-dir Flask Flask-Compress Flask-Cors
To publish a model API with R, you must also add plumber
and future
to the Environment:
# Make sure R is installed, then add plumber and future
RUN R --no-save -e "install.packages(c('plumber', 'future'))"
The Environment modifications needed to host a web application in Domino depend on the framework you are using; see App publishing.