microservices/deployment-service/snakeapi_service/entrypoint.sh

19 lines
501 B
Bash
Raw Normal View History

2025-04-25 09:21:18 -07:00
#!/usr/bin/env bash
while true; do
# Fetch the latest notebook from S3 (common bucket + prefix)
aws --endpoint-url "$AWS_ENDPOINT_URL_S3" --region "$AWS_REGION" \
s3 cp "s3://$BUCKET_NAME/$INSTANCE_PREFIX/notebook.ipynb" notebook.ipynb
# Execute all cells, including run_server(...) in the last cell
jupyter nbconvert \
--to notebook \
--execute \
--inplace \
--ExecutePreprocessor.timeout=0 \
notebook.ipynb
echo "Notebook executed; restarting..."
sleep 1
done