Example #1
0
 def from_options(cls, options):
     # type: (PipelineOptions) -> DockerEnvironment
     if options.view_as(SetupOptions).prebuild_sdk_container_engine:
         prebuilt_container_image = SdkContainerImageBuilder.build_container_image(
             options)
         return cls.from_container_image(
             container_image=prebuilt_container_image,
             artifacts=python_sdk_dependencies(options))
     return cls.from_container_image(
         container_image=options.environment_config,
         artifacts=python_sdk_dependencies(options))
Example #2
0
 def from_options(cls, options):
     # type: (PortableOptions) -> DockerEnvironment
     if options.view_as(SetupOptions).prebuild_sdk_container_engine:
         prebuilt_container_image = SdkContainerImageBuilder.build_container_image(
             options)
         return cls.from_container_image(
             container_image=prebuilt_container_image,
             artifacts=python_sdk_dependencies(options),
             resource_hints=resource_hints_from_options(options),
         )
     return cls.from_container_image(
         container_image=options.lookup_environment_option(
             'docker_container_image') or options.environment_config,
         artifacts=python_sdk_dependencies(options),
         resource_hints=resource_hints_from_options(options),
     )