mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-20 19:12:24 +00:00
Build docker image cache fixes. (#5902)
Fix Python 3.5 compatibility issue in tools/ci_build/get_docker_image.py. Fix line endings in tools/ci_build/github/azure-pipelines/clean-build-docker-image-cache-pipeline.yml.
This commit is contained in:
parent
3d5b48a894
commit
5e8fcda24a
2 changed files with 25 additions and 26 deletions
|
|
@ -77,13 +77,12 @@ def update_hash_with_directory(dir_file_info: FileInfo, hash_obj):
|
|||
hash_obj.update(file_info_str(dir_file_info).encode())
|
||||
|
||||
files, dirs = [], []
|
||||
with os.scandir(dir_file_info.path) as dir_it:
|
||||
for dir_entry in dir_it:
|
||||
file_info = FileInfo(dir_entry.path, dir_entry.stat().st_mode)
|
||||
if dir_entry.is_dir():
|
||||
dirs.append(file_info)
|
||||
elif dir_entry.is_file():
|
||||
files.append(file_info)
|
||||
for dir_entry in os.scandir(dir_file_info.path):
|
||||
file_info = FileInfo(dir_entry.path, dir_entry.stat().st_mode)
|
||||
if dir_entry.is_dir():
|
||||
dirs.append(file_info)
|
||||
elif dir_entry.is_file():
|
||||
files.append(file_info)
|
||||
|
||||
def file_info_key(file_info: FileInfo):
|
||||
return file_info.path
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
jobs:
|
||||
- job: Clean_Build_Docker_Image_Cache
|
||||
|
||||
pool:
|
||||
vmImage: 'ubuntu-18.04'
|
||||
|
||||
timeoutInMinutes: 10
|
||||
|
||||
steps:
|
||||
- task: AzureCLI@2
|
||||
inputs:
|
||||
azureSubscription: 'AIInfraBuild'
|
||||
scriptType: 'bash'
|
||||
scriptLocation: 'inlineScript'
|
||||
inlineScript: |
|
||||
tools/ci_build/clean_docker_image_cache.py \
|
||||
--container-registry $(buildcache-container-registry) \
|
||||
--log-storage-account $(buildcache-log-storage-account) \
|
||||
--log-storage-container $(buildcache-log-storage-account-container)
|
||||
jobs:
|
||||
- job: Clean_Build_Docker_Image_Cache
|
||||
|
||||
pool:
|
||||
vmImage: 'ubuntu-18.04'
|
||||
|
||||
timeoutInMinutes: 10
|
||||
|
||||
steps:
|
||||
- task: AzureCLI@2
|
||||
inputs:
|
||||
azureSubscription: 'AIInfraBuild'
|
||||
scriptType: 'bash'
|
||||
scriptLocation: 'inlineScript'
|
||||
inlineScript: |
|
||||
tools/ci_build/clean_docker_image_cache.py \
|
||||
--container-registry $(buildcache-container-registry) \
|
||||
--log-storage-account $(buildcache-log-storage-account) \
|
||||
--log-storage-container $(buildcache-log-storage-account-container)
|
||||
|
|
|
|||
Loading…
Reference in a new issue