зеркало из https://github.com/microsoft/SynapseML.git
chore: add conda env caching (#2207)
This commit is contained in:
Родитель
d789b02b9e
Коммит
07b2451e3b
|
@ -2,19 +2,21 @@ steps:
|
|||
- bash: echo "##vso[task.prependpath]$CONDA/bin"
|
||||
displayName: Add conda to PATH
|
||||
retryCountOnTaskFailure: 1
|
||||
# - bash: sudo chown -R $(whoami):$(id -ng) $(CONDA_CACHE_DIR)
|
||||
# displayName: Fix directory permissions
|
||||
# - task: Cache@2
|
||||
# displayName: Use cached Anaconda environment
|
||||
# inputs:
|
||||
# key: 'conda | "$(Agent.OS)" | environment.yml'
|
||||
# restoreKeys: |
|
||||
# python | "$(Agent.OS)"
|
||||
# python
|
||||
# path: $(CONDA_CACHE_DIR)
|
||||
# cacheHitVar: CONDA_CACHE_RESTORED
|
||||
- bash: sudo chown -R $(whoami):$(id -ng) $(CONDA_CACHE_DIR)
|
||||
displayName: Fix directory permissions
|
||||
- task: Cache@2
|
||||
displayName: Use cached Anaconda environment
|
||||
inputs:
|
||||
key: 'conda | "$(Agent.OS)" | environment.yml'
|
||||
restoreKeys: |
|
||||
python | "$(Agent.OS)"
|
||||
python
|
||||
path: $(CONDA_CACHE_DIR)
|
||||
cacheHitVar: CONDA_CACHE_RESTORED
|
||||
timeoutInMinutes: 20
|
||||
retryCountOnTaskFailure: 1
|
||||
- bash: |
|
||||
(timeout 30m conda env create --force -f environment.yml -v) || (timeout 30m conda env create --force -f environment.yml -v)
|
||||
displayName: Create Anaconda environment
|
||||
retryCountOnTaskFailure: 1
|
||||
# condition: eq(variables.CONDA_CACHE_RESTORED, 'false')
|
||||
condition: eq(variables.CONDA_CACHE_RESTORED, 'false')
|
||||
|
|
Загрузка…
Ссылка в новой задаче