Skip to main content

DIAL App Builder Python

DIAL App Builder Python prepares Code App sources for a container image build. It downloads a project from DIAL file storage, validates its entrypoint and requirements, and supplies a Dockerfile template. This reference covers 0.1.0 for platform engineers configuring the App Controller build pipeline.

Role in Code Apps​

The builder is a command-line process, not a persistent HTTP service or the DIAL Chat application editor. It runs as the preparation init container in an App Controller build Job. A separate image-builder container, Kaniko by default, builds and pushes the application image.

StageComponentOutput
AuthorDIAL Chat and DIAL CoreA project folder in DIAL file storage
PrepareApp Builder PythonDownloaded, validated sources and a selected Dockerfile template
BuildKaniko or a compatible configured image builderAn application image in a registry
RunApp Controller and KnativeA service that runs the Code App

The two build containers and their shared mounts are defined in App Controller's application.yaml. Source authors use the Code Apps guides; they do not deploy the builder directly.

Processing​

  1. Copy the template. The image entrypoint copies templates/$PROFILE/* into TEMPLATES_DIR.
  2. Read the source folder. The Python process requests recursive metadata from Core and follows pagination tokens.
  3. Download files. Each file is downloaded through Core's file API into TARGET_DIR, preserving its relative path.
  4. Validate the project. For the bundled python-pip profile, app.py must exist and requirements must pass the package allowlist.
  5. Exit. A successful preparation allows the Job's image-building container to proceed. Preparation failures stop the init container.

Sources: entrypoint, downloads and pagination, and validation.

Project and runtime contract​

The python-pip profile expects a project with this structure:

sources/
├── app.py
├── requirements.txt
└── other application files

app.py is mandatory. A missing requirements.txt is created as an empty file during validation. The generated runtime starts Uvicorn with app:app, so the module must expose an ASGI application named app. Existence of that object is not checked by the builder.

The Dockerfile template takes BASE_IMAGE from the controller's runtime configuration. It installs Uvicorn 0.31.0 and the project's requirements, copies the sources, and runs as UID 1001 on port 8080. The project declares any SDK or application dependencies it needs in requirements.txt.

Dependencies and deployment​

DependencyPurpose
DIAL Core file and metadata APIsLists and downloads the source project
DIAL credentialsSupply access to the source folder, normally through the build Secret created by App Controller
Writable source and template directoriesShare prepared files with the image-builder container
App ControllerSupplies the source folder, profile, DIAL URL, and package allowlist
Image builder and registryConsume the output; the Python preparation process does not build or push the final image itself

The published preparation image is epam/ai-dial-app-builder-python:0.1.0. Its Dockerfile uses Python 3.11, runs as UID 1001, and prepares writable /sources and /templates directories. It exposes no HTTP port or health endpoint.

The DIAL 1.38 to 1.48 platform releases pin 0.1.0.

The builder's Python version is separate from the generated application's BASE_IMAGE. Controller runtime selection determines the latter; see Build and runtime selection.

Warning

The allowlist validates requirement names; it does not isolate running application code or its network access. Kubernetes workload permissions, egress rules, filesystem access, and resource limits remain deployment responsibilities.