Skip to content

Commit 3615688

Browse files
authored
πŸ’š Fix CI build: Upgrade miniconda (4.8.2 β†’ 4.12.0) (#1803)
2 parents 4bb27d6 + f3c5a60 commit 3615688

File tree

6 files changed

+27
-23
lines changed

6 files changed

+27
-23
lines changed

β€Ž.github/Dockerfiles/Ubuntu.bionic-non-free.Dockerfileβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ RUN groupadd -r c-pac && \
107107
libxp-dev && \
108108
add-apt-repository --remove --yes ppa:zeehio/libxp && \
109109
apt-get update && \
110-
curl -sO https://repo.anaconda.com/miniconda/Miniconda3-py37_4.8.2-Linux-x86_64.sh && \
111-
bash Miniconda3-py37_4.8.2-Linux-x86_64.sh -b -p /usr/local/miniconda && \
112-
rm Miniconda3-py37_4.8.2-Linux-x86_64.sh && chmod -R 777 /usr/local/miniconda && \
110+
curl -sO https://repo.anaconda.com/miniconda/Miniconda3-py37_4.12.0-Linux-x86_64.sh && \
111+
bash Miniconda3-py37_4.12.0-Linux-x86_64.sh -b -p /usr/local/miniconda && \
112+
rm Miniconda3-py37_4.12.0-Linux-x86_64.sh && chmod -R 777 /usr/local/miniconda && \
113113
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
114114
echo $TZ > /etc/timezone && \
115115
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \

β€Ž.github/Dockerfiles/Ubuntu.xenial-20200114.Dockerfileβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ RUN apt-get update && \
120120
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
121121

122122
# Installing and setting up miniconda
123-
RUN curl -sSLO https://repo.continuum.io/miniconda/Miniconda3-4.5.11-Linux-x86_64.sh && \
124-
bash Miniconda3-4.5.11-Linux-x86_64.sh -b -p /usr/local/miniconda && \
125-
rm Miniconda3-4.5.11-Linux-x86_64.sh && chmod -R 777 /usr/local/miniconda
123+
RUN curl -sSLO https://repo.continuum.io/miniconda/Miniconda3-py37_4.12.0-Linux-x86_64.sh && \
124+
bash Miniconda3-py37_4.12.0-Linux-x86_64.sh -b -p /usr/local/miniconda && \
125+
rm Miniconda3-py37_4.12.0-Linux-x86_64.sh && chmod -R 777 /usr/local/miniconda
126126

127127
# Set CPATH for packages relying on compiled libs (e.g. indexed_gzip)
128128
ENV PATH="/usr/local/miniconda/bin:$PATH" \

β€Ž.github/scripts/get_package_id.pyβ€Ž

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@
1111

1212
def get_packages(owner, tag, api_token=None):
1313
"""Function to collect GHCR packages for a given owner & tag
14-
14+
1515
Parameters
1616
----------
1717
owner : str
1818
username or org name
19-
19+
2020
tag : str
2121
image tag (part left of the colon)
2222
2323
api_token : str or None
2424
GitHub API personal access token with read.packages permission
25-
25+
2626
Returns
2727
-------
2828
list
@@ -32,11 +32,11 @@ def get_packages(owner, tag, api_token=None):
3232

3333
def fetch(url):
3434
"""Method to make API call and return response, given a URL
35-
35+
3636
Parameters
3737
----------
3838
url : str
39-
39+
4040
Returns
4141
-------
4242
dict or list
@@ -59,34 +59,36 @@ def fetch(url):
5959
'$VERSION_TAG $GITHUB_TOKEN`'
6060
]))
6161
return response
62-
packages = fetch(
62+
_packages = fetch(
6363
f'https://api.github.com/orgs/{owner}/packages/container/'
6464
f'{tag}/versions')
65-
if packages.get('message', 'Not Found') == 'Not Found':
66-
packages = fetch(
67-
f'https://api.github.com/users/{owner}/packages/container/'
68-
f'{tag}/versions')
65+
packages = []
66+
for _package in _packages:
67+
if _package.get('message', 'Not Found') == 'Not Found':
68+
packages += fetch(
69+
f'https://api.github.com/users/{owner}/packages/container/'
70+
f'{tag}/versions')
6971
return packages
7072

7173

7274
def id_from_tag(owner, image, tag, api_token=None):
7375
"""Function to return a package ID given an image version tag
74-
76+
7577
Parameters
7678
----------
7779
owner : str
7880
GitHub username or org name
79-
81+
8082
image : str
8183
Image tag (the part to the left of the colon)
82-
84+
8385
tag : str
8486
Image version tag (the part to the right of the colon)
8587
8688
api_token: str or None
8789
GitHub API personal access token with read.packages permission
8890
"""
89-
packages = get_packages(owner, image)
91+
packages = get_packages(owner, image, api_token)
9092
versions = [image['id'] for image in packages if tag in image.get(
9193
'metadata', {}
9294
).get('container', {}).get('tags', [])]

β€Ž.github/workflows/build_stages.ymlβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
DOCKER_TAG=$(echo "ghcr.io/${{ github.repository }}/$TAG" | tr '[:upper:]' '[:lower:]')
6767
echo DOCKER_TAG=$DOCKER_TAG >> $GITHUB_ENV
6868
docker manifest inspect $DOCKER_TAG >/dev/null
69-
echo "::set-output name=not_yet_exists::$?"
69+
echo "not_yet_exists=$?" >> $GITHUB_OUTPUT
7070
- name: Set up Docker Buildx
7171
uses: docker/[email protected]
7272
if: contains(steps.changed-files-base.outputs.all_changed_files, matrix.Dockerfile) || contains(steps.changed-files.outputs.all_changed_files, matrix.Dockerfile)
@@ -156,7 +156,7 @@ jobs:
156156
DOCKER_TAG=$(echo "ghcr.io/${{ github.repository }}/$TAG" | tr '[:upper:]' '[:lower:]')
157157
echo DOCKER_TAG=$DOCKER_TAG >> $GITHUB_ENV
158158
docker manifest inspect $DOCKER_TAG >/dev/null
159-
echo "::set-output name=not_yet_exists::$?"
159+
echo "not_yet_exists=$?" >> $GITHUB_OUTPUT
160160
if: contains(steps.changed-files-base.outputs.all_changed_files, matrix.Dockerfile) || contains(steps.changed-files.outputs.all_changed_files, matrix.Dockerfile)
161161
- name: Prep Dockerfiles for forked repository
162162
if: github.repository_owner != 'FCP-INDI' && contains(steps.changed-files-base.outputs.all_changed_files, matrix.Dockerfile) || contains(steps.changed-files.outputs.all_changed_files, matrix.Dockerfile)
@@ -230,7 +230,7 @@ jobs:
230230
DOCKER_TAG=$(echo "ghcr.io/${{ github.repository }}/$TAG" | tr '[:upper:]' '[:lower:]')
231231
echo DOCKER_TAG=$DOCKER_TAG >> $GITHUB_ENV
232232
docker manifest inspect $DOCKER_TAG >/dev/null
233-
echo "::set-output name=not_yet_exists::$?"
233+
echo "not_yet_exists=$?" >> $GITHUB_OUTPUT
234234
id: docker_tag
235235
- name: Clear up some space on runner
236236
if: always() && steps.changed-files-base.outputs.any_changed == 'true' || steps.changed-files.outputs.any_changed == 'true' || steps.docker_tag.not_yet_exists == 1

β€ŽCPAC/info.pyβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ def get_cpac_gitversion():
177177
"future",
178178
"INDI-Tools",
179179
"lockfile==0.12.2",
180+
"joblib==1.0.1",
180181
"matplotlib==3.1.3",
181182
"networkx==2.4",
182183
"nibabel==2.3.3",

β€Žrequirements.txtβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ click==6.7
33
configparser==3.7.4
44
future==0.16.0
55
git+https://[email protected]/FCP-INDI/INDI-Tools.git#egg=INDI-Tools
6+
joblib==1.0.1
67
lockfile==0.12.2
78
matplotlib==3.1.3
89
networkx==2.4

0 commit comments

Comments
Β (0)