File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 7676 # set this environment variable instead.
7777 # Setting this variable via `env` did not seem to work for some reason.
7878 export CONDA_SOLVER=libmamba
79- conda build --override-channels -c conda-forge --output-folder output/ conda.recipe/
79+ # Retry conda build up to N times to handle transient checksum
80+ # mismatch failures caused by stale cached repodata.
81+ max_attempts=5
82+ for attempt in $(seq 1 $max_attempts); do
83+ echo "conda build attempt $attempt"
84+ conda clean --all -y
85+ if conda build --override-channels -c conda-forge --output-folder output/ conda.recipe/; then
86+ break
87+ fi
88+ if [ "$attempt" -eq "$max_attempts" ]; then
89+ echo "conda build failed after $max_attempts attempts"
90+ exit 1
91+ fi
92+ echo "Attempt $attempt failed, retrying..."
93+ done
8094 # This is need to ensure ~/.profile or ~/.bashrc are used so the activate
8195 # command works.
8296 shell : bash -l {0}
You can’t perform that action at this time.
0 commit comments