Skip to content

Commit 8fe2f3b

Browse files
committed
Fixes unit tests.
1 parent 7270133 commit 8fe2f3b

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

ads/opctl/distributed/cmds.py

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,22 @@
44
# Copyright (c) 2022, 2023 Oracle and/or its affiliates.
55
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
66

7-
import os
8-
import fsspec
9-
import subprocess
10-
import yaml
117
import json
8+
import os
129
import re
13-
import docker
10+
import subprocess
1411
from configparser import ConfigParser
15-
16-
from ads.common.auth import create_signer, AuthType, AuthContext
1712
from urllib.parse import urlparse
18-
from ads.jobs import Job, DataScienceJobRun
13+
14+
import fsspec
15+
import yaml
16+
17+
from ads.common.auth import AuthContext, AuthType, create_signer
18+
from ads.common.decorator.runtime_dependency import (
19+
OptionalDependency,
20+
runtime_dependency,
21+
)
22+
from ads.jobs import Job
1923
from ads.jobs.builders.runtimes.artifact import Artifact
2024
from ads.opctl.utils import publish_image as publish_image_cmd
2125
from ads.opctl.utils import run_command
@@ -137,6 +141,7 @@ def show_config_info(job_id, work_dir, cluster_file_name, worker_info, **kwargs)
137141
)
138142

139143

144+
@runtime_dependency(module="docker", install_from=OptionalDependency.OPCTL)
140145
def verify_image(img_name):
141146
"""
142147
Verify if the input image exists in OCI registry
@@ -151,6 +156,8 @@ def verify_image(img_name):
151156
-------
152157
153158
"""
159+
import docker
160+
154161
client = docker.from_env()
155162
try:
156163
client.images.get_registry_data(img_name)

0 commit comments

Comments
 (0)