Custom images can be made automatically compatible with Domino Jobs and Workspaces when creating an environment, as explained in Automatic Adaptation of Custom 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 shown below:
# 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 jsonify
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.