The build.sh
script passes common options to the underlying docker build
commands for the base and derived images. It enables developers the ability to customize the included components.
Use the --help option to see how the use the script. All arguments are optional.
docker/build.sh --help
usage: build.sh
[--base base image]
[--framework ffmpeg || gstreamer]
[--models path to models directory or model list file or NONE]
[--open-model-zoo-image specify the base image to be used for downloading models from Open Model Zoo]
[--open-model-zoo-version specify the version of base image to be used for downloading models from Open Model Zoo]
[--force-model-download force the download of models from Open Model Zoo]
[--pipelines path to pipelines directory relative to <source directory of Pipeline Server> or NONE]
[--base-build-context docker context for building base image]
[--base-build-dockerfile docker file path used to build base image from build context]
[--build-option additional docker build option that run in the context of docker build. ex. --no-cache]
[--base-build-option additional docker build option for docker build of base image]
[--build-arg additional build args to pass to docker build]
[--base-build-arg additional build args to pass to docker build for base image]
[--tag docker image tag]
[--create-service create an entrypoint to run dlstreamer-pipeline-server as a service]
[--target build a specific target]
[--dockerfile-dir specify a different dockerfile directory]
[--environment-file read and set environment variables from a file. Can be supplied multiple times.]
[--dry-run print docker commands without running]
All command line options are optional. Details of key options and their default values are shown below:
This is the image that docker builds on. It must contain the full set of framework dependencies needed for either Intel(R) DL Streamer or FFmpeg Video Analytics and must match the framework selected with the --framework
option. If a base image is not defined you must provide the location of the Dockerfile to build the base image (see --base-build-context
and --base-build-dockerfile
).
Intel(R) Deep Learning Streamer (Intel(R) DL Streamer) Pipeline Server can use either gstreamer
or ffmpeg
for pipeline construction. Select framework with --framework
option. Default is gstreamer
.
This option can be used to specify path to models directory or a model list file. When its a directory, models used by pipelines are expected to be in this directory. When its a file, the models listed in the file are downloaded and converted to IR format if needed by the model download tool during build time. If nothing is specified, default models listed in the file models_list/models.list.yml
are downloaded, converted to IR format if needed and included in the image. If set to NONE
no models are included and the user must ensure models are made available at runtime by volume mounting.
This option can be used to specify the base image to be used for downloading models from Open Model Zoo.
For GStreamer, the Pipeline Server build script will automatically choose the Open Model Zoo image as per the table in section.
For FFmpeg, you must specify the Open Model Zoo image to build with (i.e., when using --framework ffmpeg
provide the image corresponding to the table in section).
This option can be used to specify the version of the base image to be used for downloading models from Open Model Zoo.
For GStreamer, the Pipeline Server build script will automatically choose the Open Model Zoo version as per the table in section.
For FFmpeg, you must specify the Open Model Zoo version to build with (i.e., when using --framework ffmpeg
provide the version corresponding to the table in section).
This option instructs the model download tool to force download of models from Open Model Zoo using the models.list.yml
even if they already exist in the models directory. This may be useful to guarantee that the models for your build have been generated using the appropriate version of Open Model Zoo before they are embedded into your freshly built image.
If you have previously built for a different framework, you must download these again (or archive your models directory to different name), because the version of Open Model Zoo used by --framework gstreamer
produces different output than when building with --framework ffmpeg
.
Path to the Pipeline Server pipelines. Path must be within docker build context which defaults to the root of the dlstreamer-pipeline-server project. If not specified, sample pipelines are included in the image. If set to NONE
no pipelines are included and the user must ensure pipelines are made available at runtime by volume mounting.
This option is used in conjunction with --base-build-dockerfile
to specify the docker build file and its context. It must be a git repo URL, path to tarball or path to locally cloned folder.
This option is used in conjunction with --base-build-context
to specify the docker build file and its context. Default values are framework dependent. If framework is gstreamer
the dockerfile for Intel(R) DL Streamer
is selected, otherwise the dockerfile is set for the FFmpeg Video Analytics
image.
Specify a docker build option when building the Pipeline Server image.
Specify a docker build option when building the base image.
Specify a docker build argument when building the Pipeline Server image.
Specify and docker build argument when building the base image.
Set tag of the Pipeline Server image you build. Default value is framework
based.
- For
gstreamer
framework:dlstreamer-pipeline-server-gstreamer
- For
ffmpeg
framework:dlstreamer-pipeline-server-ffmpeg
Build the image as a service. Default value is TRUE.
Build a specific target in the Dockerfile.
Specify a different dockerfile directory.
Read and set environment variables from a file. Can be supplied multiple times.
Print the docker commands without building the image.