This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 142
/
inner_eye_env.yml
43 lines (34 loc) · 1.52 KB
/
inner_eye_env.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
steps:
- template: checkout.yml
- template: store_settings.yml
- template: prepare_conda.yml
- bash: echo "##vso[task.setvariable variable=conda_env_dir]/usr/share/miniconda/envs"
displayName: "Set the Conda environment folder (Linux)"
condition: eq(variables['Agent.OS'], 'Linux')
- bash: echo "##vso[task.setvariable variable=conda_env_dir]C:/Miniconda/envs"
displayName: "Set the Conda environment folder(Windows)"
condition: eq(variables['Agent.OS'], 'Windows_NT')
- bash: echo $(conda_env_dir)
displayName: 'Printing Conda environment folder'
# https://docs.microsoft.com/en-us/azure/devops/pipelines/release/caching?view=azure-devops#pythonanaconda
- task: Cache@2
displayName: Use cached Conda environment
inputs:
# Beware of changing the cache key or path independently, safest to change in sync
key: 'conda_env | "$(Agent.OS)" | environment.yml'
cacheHitVar: CONDA_CACHE_RESTORED
path: $(conda_env_dir)
- bash: conda env create --file environment.yml
displayName: Create Anaconda environment
failOnStderr: false # Conda env create does not have an option to suppress warnings generated in wheel.py
condition: eq(variables.CONDA_CACHE_RESTORED, 'false')
- bash: |
source activate InnerEye
which python
conda info
pip freeze
failOnStderr: false
displayName: Print package list and Conda info
condition: succeededOrFailed()
- bash: source activate InnerEye
displayName: Check if InnerEye environment is present