Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
[CI] clean docker cache for neuron (vllm-project#4441)
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-mo authored and robertgshaw2-neuralmagic committed May 6, 2024
1 parent 6a8a97b commit 8ab0de8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .buildkite/run-neuron-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ set -e

# Try building the docker image
aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin 763104351884.dkr.ecr.us-west-2.amazonaws.com

# prune old image and containers to save disk space, and only once a day
# by using a timestamp file in tmp.
if [ -f /tmp/neuron-docker-build-timestamp ]; then
last_build=$(cat /tmp/neuron-docker-build-timestamp)
current_time=$(date +%s)
if [ $((current_time - last_build)) -gt 86400 ]; then
docker system prune -f
echo $current_time > /tmp/neuron-docker-build-timestamp
fi
else
echo $(date +%s) > /tmp/neuron-docker-build-timestamp
fi

docker build -t neuron -f Dockerfile.neuron .

# Setup cleanup
Expand Down

0 comments on commit 8ab0de8

Please sign in to comment.