Skip to content

Commit 3082b37

Browse files
committed
Use conda base instead of python wrapper in the alibi-explain CI job
1 parent e62d8dd commit 3082b37

File tree

1 file changed

+13
-36
lines changed

1 file changed

+13
-36
lines changed

.github/workflows/security_tests_python_v1.yml

Lines changed: 13 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ jobs:
168168
path: report-${{ matrix.server }}.txt
169169

170170
build-alibi-explain:
171-
if: false
172171
needs: build-upload-scan-base-images
173172
runs-on: ubuntu-latest
174173
steps:
@@ -185,32 +184,25 @@ jobs:
185184
- uses: actions/download-artifact@v4
186185
with:
187186
name: conda-base-image
188-
# Download Python Wrapper image
189-
- uses: actions/download-artifact@v4
190-
with:
191-
name: python-wrapper-image
192187
- name: Load images
193-
run: |
194-
docker load -i conda-image.tar
195-
docker load -i python-wrapper-image.tar
188+
run: docker load -i conda-image.tar
196189

197190
- name: Remove tarballs
198-
run: rm -f conda-image.tar python-wrapper-image.tar
191+
run: rm -f conda-image.tar
199192

200193
- name: Build Alibi Explain
201194
id: build-alibi-explain
202195
working-directory: ./components/alibi-explain-server
203196
run: |
204197
export ALIBI_EXPLAIN_IMAGE_TAG="sec-tests/alibi-explain-$(date +%s)-$(openssl rand -hex 4)"
205198
echo "ALIBI_EXPLAIN_IMAGE_TAG=$ALIBI_EXPLAIN_IMAGE_TAG" >> $GITHUB_ENV
206-
make IMAGE=$ALIBI_EXPLAIN_IMAGE_TAG VERSION=test BASE_IMAGE=${{ needs.build-upload-scan-base-images.outputs.python_base_image_tag }} docker-build
199+
make IMAGE=$ALIBI_EXPLAIN_IMAGE_TAG VERSION=test BASE_IMAGE=${{ needs.build-upload-scan-base-images.outputs.conda_base_image_tag }} docker-build
207200
208-
- name: Free Docker space before Snyk Scan
209-
run: |
210-
df -h
211-
docker rmi ${{ needs.build-upload-scan-base-images.outputs.conda_base_image_tag }}:test
212-
docker rmi ${{ needs.build-upload-scan-base-images.outputs.python_base_image_tag }}:test
213-
df -h
201+
- name: Free space by removing the Conda Base Docker image
202+
run: docker rmi ${{ needs.build-upload-scan-base-images.outputs.conda_base_image_tag }}:test
203+
204+
- name: Free up space by removing the Docker Builder caches
205+
run: docker builder prune -af
214206

215207
- name: Scan alibi explain
216208
id: scan-alibi-explain
@@ -250,8 +242,7 @@ jobs:
250242
with:
251243
name: conda-base-image
252244
- name: Load image
253-
run: |
254-
docker load -i conda-image.tar
245+
run: docker load -i conda-image.tar
255246

256247
- name: Remove tarballs
257248
run: rm -f conda-image.tar
@@ -263,26 +254,12 @@ jobs:
263254
export ALIBI_DETECT_IMAGE_TAG="sec-tests/alibi-detect-$(date +%s)-$(openssl rand -hex 4)"
264255
echo "ALIBI_DETECT_IMAGE_TAG=$ALIBI_DETECT_IMAGE_TAG" >> $GITHUB_ENV
265256
make IMAGE=$ALIBI_DETECT_IMAGE_TAG VERSION=test BASE_IMAGE=${{ needs.build-upload-scan-base-images.outputs.conda_base_image_tag }} docker-build
266-
267-
- name: Docker images
268-
run: |
269-
docker image list
270257
271-
- name: Free Docker space before Snyk Scan
272-
run: |
273-
df -h
274-
docker rmi ${{ needs.build-upload-scan-base-images.outputs.conda_base_image_tag }}:test
275-
df -h
258+
- name: Free space by removing the Conda Base Docker image
259+
run: docker rmi ${{ needs.build-upload-scan-base-images.outputs.conda_base_image_tag }}:test
276260

277-
- name: Docker images
278-
run: |
279-
docker image list
280-
281-
- name: Display whats consuming so much memory
282-
run: |
283-
sudo du -sh /var/* | sort -hr | head
284-
docker builder prune -af
285-
docker system df
261+
- name: Free up space by removing the Docker Builder caches
262+
run: docker builder prune -af
286263

287264
- uses: snyk/actions/setup@master
288265
# Run Snyk container scan with the same flags you use today

0 commit comments

Comments
 (0)