Skip to content

Commit 0f46702

Browse files
committed
Fix disk space blowup by adding cache clean
1 parent 4e4e8e1 commit 0f46702

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

.github/workflows/docker.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ jobs:
2222
push_to_registry:
2323
name: Push Docker image to Docker Hub
2424
runs-on:
25-
- self-hosted
26-
- docker
25+
- ubuntu-latest
2726
steps:
2827
- name: Checkout repository
2928
uses: actions/checkout@v5.0.0
@@ -34,6 +33,17 @@ jobs:
3433
VERSION=$(grep -A 1 'name = "vllm"' uv.lock | grep version | cut -d '"' -f 2)
3534
echo "version=$VERSION" >> $GITHUB_OUTPUT
3635
36+
- name: Free up disk space
37+
run: |
38+
echo "Disk space before cleanup:"
39+
df -h
40+
# Remove Docker cache and unused images
41+
docker system prune -af --volumes || true
42+
# Clean buildx cache
43+
docker buildx prune -af || true
44+
echo "Disk space after cleanup:"
45+
df -h
46+
3747
- name: Set up Docker Buildx
3848
uses: docker/setup-buildx-action@v3
3949

@@ -59,3 +69,14 @@ jobs:
5969
${{ steps.meta.outputs.tags }}
6070
vectorinstitute/vector-inference:${{ steps.vllm-version.outputs.version }}
6171
labels: ${{ steps.meta.outputs.labels }}
72+
cache-from: type=registry,ref=vectorinstitute/vector-inference:buildcache
73+
cache-to: type=registry,ref=vectorinstitute/vector-inference:buildcache,mode=min
74+
75+
- name: Clean up after build
76+
if: always()
77+
run: |
78+
echo "Cleaning up build artifacts..."
79+
docker system prune -af || true
80+
docker buildx prune -af || true
81+
echo "Final disk space:"
82+
df -h

0 commit comments

Comments
 (0)