@@ -61,7 +61,10 @@ aws configure set default.s3.multipart_threshold 5120MB
6161# Decide whether to parallelize tutorial builds, based on $JOB_BASE_NAME
6262export NUM_WORKERS=20
6363if [[ " ${JOB_BASE_NAME} " == * worker_* ]]; then
64- # Step 1: Keep certain tutorials based on file count, and remove runnable code in all other tutorials
64+ # Step 1: Remove files that are not runnable
65+ rm beginner_source/aws_distributed_training_tutorial.py || true
66+
67+ # Step 2: Keep certain tutorials based on file count, and remove runnable code in all other tutorials
6568 export WORKER_ID=$( echo " ${JOB_BASE_NAME} " | tr -dc ' 0-9' )
6669 count=0
6770 for filename in $( find beginner_source/ -name ' *.py' -not -path ' */data/*' ) ; do
@@ -92,10 +95,10 @@ if [[ "${JOB_BASE_NAME}" == *worker_* ]]; then
9295 count=$(( count+ 1 ))
9396 done
9497
95- # Step 2 : Run `make docs` to generate HTML files and static files for these tutorials
98+ # Step 3 : Run `make docs` to generate HTML files and static files for these tutorials
9699 make docs
97100
98- # Step 3 : Remove all HTML files generated from Python files that don't contain runnable code
101+ # Step 4 : Remove all HTML files generated from Python files that don't contain runnable code
99102 for filename in $( find docs/beginner -name ' *.html' ) ; do
100103 python $DIR /delete_html_file_with_runnable_code_removed.py $filename
101104 done
@@ -106,10 +109,10 @@ if [[ "${JOB_BASE_NAME}" == *worker_* ]]; then
106109 python $DIR /delete_html_file_with_runnable_code_removed.py $filename
107110 done
108111
109- # Step 4 : Remove INVISIBLE_CODE_BLOCK from all HTML files
112+ # Step 5 : Remove INVISIBLE_CODE_BLOCK from all HTML files
110113 bash $DIR /remove_invisible_code_block_batch.sh docs
111114
112- # Step 5 : Copy generated HTML files and static files to S3, tag with commit ID
115+ # Step 6 : Copy generated HTML files and static files to S3, tag with commit ID
113116 7z a worker_${WORKER_ID} .7z docs
114117 aws s3 cp worker_${WORKER_ID} .7z s3://${BUCKET_NAME} /${COMMIT_ID} /worker_${WORKER_ID} .7z --acl public-read
115118elif [[ " ${JOB_BASE_NAME} " == * manager ]]; then
0 commit comments