import { ImageConfig, BuildImageRequest, BuildImageResponse, VerifyImageBuildRequest, VerifyImageBuildResponse, ImageBuildResult, PythonVersion, GpuType, ImageCredentials } from "../../types/image"; export interface CreateImageConfig extends Partial { pythonVersion?: PythonVersion | string; pythonPackages?: string[] | string; commands?: string[]; baseImage?: string; baseImageCreds?: ImageCredentials; } export declare class Image { id: string; config: ImageConfig; isAvailable: boolean; constructor({ pythonVersion, pythonPackages, commands, buildSteps, baseImage, baseImageCreds, envVars, secrets, dockerfile, gpu, ignorePython, includeFilesPatterns, buildCtxObject, imageId, }: CreateImageConfig); static fromDockerfile(dockerfilePath: string, contextDir?: string): Promise; static fromRegistry(imageUri: string, credentials?: ImageCredentials): Image; buildImage(request: BuildImageRequest): Promise>; private _transformRequestToSnakeCase; private _cacheKey; private _cachedBuildResult; private _rememberBuildResult; private _imageBuildCacheDisabled; private _imageBuildCacheTTLMS; private _createAsyncIterable; verifyImageBuild(request: VerifyImageBuildRequest): Promise; static fromId(imageId: string): Image; exists(): Promise<{ exists: boolean; result: ImageBuildResult; }>; build(): Promise; /** * Switch the image to use micromamba for Python package installs. * * This rewrites the configured `pythonVersion` to a micromamba variant. * * @returns The image instance. */ micromamba(): Image; /** * Add micromamba packages to install during the image build. * * Packages are appended to the existing list and installed in the order added. * If a single string is provided, it is treated as a path to a requirements.txt file. * * @param packages The micromamba packages to add or the path to a requirements.txt file. * @param channels Optional micromamba channels. Currently unused. * @returns The image instance. * @throws Error if micromamba mode is not enabled (call `micromamba()` first). */ addMicromambaPackages(packages: string[] | string, channels?: string[]): Image; /** * Add Python packages to install during the image build. * * Packages are appended to the existing list and installed in the order added. * If a single string is provided, it is treated as a path to a requirements.txt file. * * @param packages The Python packages to add or the path to a requirements.txt file. * @returns The image instance. * @throws Error if a requirements.txt path is provided but cannot be read. */ addPythonPackages(packages: string[] | string): Image; /** * Add a local path to the image. * * @param pattern The pattern to add. This can be a glob pattern or a single file. * @returns The image instance. */ addLocalPath(pattern?: string): Image; /** * Add environment variables to the image. * * These will be available when building the image and when the container is running. * This replaces any previously configured environment variables. * * @param envVars Environment variables. This can be a string, a list of strings, or a * dictionary of strings. The string must be in the format of "KEY=VALUE". If a list of * strings is provided, each element should be in the same format. * @returns The image instance. */ withEnvs(envVars: string[] | Record | string): Image; /** * Add secrets stored in the platform to the build environment. * * @param secrets The secrets to add. * @returns The image instance. */ withSecrets(secrets: string[]): Image; /** * Build the image on a GPU node. * * @param gpu The GPU type to use. * @returns The image instance. */ buildWithGpu(gpu: GpuType): Image; /** * Install Docker Engine, CLI, Buildx and Compose on Ubuntu or Debian. * Pair with `dockerEnabled: true` to start the managed daemon at runtime. */ withDocker(): Image; /** * Sync files using FileSyncer */ syncFiles(contextDir?: string, cacheObjectId?: boolean): Promise; getCredentialsFromEnv(): Record; private _sanitizePythonPackages; private _loadRequirementsFile; private _processCredentials; private _validateEnvVars; private _processEnvVars; }