@@ -150,11 +150,16 @@ def build_image(image_type: str, gpu: bool = False) -> None:
150
150
else :
151
151
# https://stackoverflow.com/questions/66842004/get-the-processor-type-using-python-for-apple-m1-processor-gives-me-an-intel-pro
152
152
import cpuinfo
153
+
153
154
# Just get the manufacturer of the processors
154
- manufacturer = cpuinfo .get_cpu_info ().get ('brand_raw' )
155
- arch = 'arm' if re .search ("apple m\d " , manufacturer , re .IGNORECASE ) else 'other'
155
+ manufacturer = cpuinfo .get_cpu_info ().get ("brand_raw" )
156
+ arch = (
157
+ "arm" if re .search ("apple m\d " , manufacturer , re .IGNORECASE ) else "other"
158
+ )
156
159
print (f"The local machine's platform is { arch } ." )
157
- image , dockerfile , target = _get_image_name_dockerfile_target (image_type , gpu , arch )
160
+ image , dockerfile , target = _get_image_name_dockerfile_target (
161
+ image_type , gpu , arch
162
+ )
158
163
print (f"dockerfile used is { dockerfile } " )
159
164
command = [
160
165
"docker" ,
@@ -186,8 +191,6 @@ def _get_image_name_dockerfile_target(type: str, gpu: bool, arch: str) -> str:
186
191
("job-local" , False , "arm" ): (ML_JOB_IMAGE , "Dockerfile.job.arm" , None ),
187
192
("job-local" , False , "other" ): (ML_JOB_IMAGE , "Dockerfile.job" , None ),
188
193
("job-local" , True , "other" ): (ML_JOB_GPU_IMAGE , "Dockerfile.job.gpu" , None ),
189
- ("ads-ops-base" , False , "other" ): (OPS_IMAGE_BASE , "Dockerfile" , "base" ),
190
- ("ads-ops-base" , True , "other" ): (OPS_IMAGE_GPU_BASE , "Dockerfile.gpu" , "base" ),
191
194
}
192
195
return look_up [(type , gpu , arch )]
193
196
0 commit comments