- Created entrypoint-self-terminate.sh wrapper script - Updates entrypoint-generic.sh to be called by wrapper - Modified Dockerfile.runpod to use self-terminate entrypoint - Adds automatic pod termination via runpodctl after training completes - Prevents infinite restart loops and wasted GPU credits - Saves ~96% cost per training run ($4.59 per run) Implements pod self-termination using RUNPOD_POD_ID environment variable. Training exits with code 0 → runpodctl remove pod → immediate shutdown. Co-Authored-By: Claude <noreply@anthropic.com>
34 lines
811 B
Bash
Executable File
34 lines
811 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
# Load RunPod credentials
|
|
source /home/jgrusewski/Work/foxhunt/.env.runpod
|
|
|
|
echo "=== Uploading Test Binaries to RunPod Volume ==="
|
|
|
|
# S3 bucket path for network volume
|
|
BUCKET="se3zdnb5o4" # Network volume ID
|
|
|
|
# Upload test binaries
|
|
for test in test1_hello test2_cuda_check; do
|
|
echo "Uploading $test..."
|
|
aws s3 cp \
|
|
--endpoint-url=$RUNPOD_S3_ENDPOINT \
|
|
--region=$RUNPOD_S3_REGION \
|
|
target/$test \
|
|
s3://$BUCKET/debug_tests/$test
|
|
|
|
echo "✓ Uploaded $test"
|
|
done
|
|
|
|
echo ""
|
|
echo "=== Verifying Uploads ==="
|
|
aws s3 ls \
|
|
--endpoint-url=$RUNPOD_S3_ENDPOINT \
|
|
--region=$RUNPOD_S3_REGION \
|
|
s3://$BUCKET/debug_tests/ --recursive --human-readable
|
|
|
|
echo ""
|
|
echo "=== Upload Complete ==="
|
|
echo "Files available at: /runpod-volume/debug_tests/"
|