|
| 1 | +# Build Spec for AWS CodeBuild CI TF 2.3.1 CPU and GPU Containers |
| 2 | +# Target Containers: |
| 3 | + # CPU Container: 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.3.1-cpu-py37-ubuntu18.04 |
| 4 | + # GPU Container 1: 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.3.1-gpu-py37-cu110-ubuntu18.04 |
| 5 | + # GPU Container 2: 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.3.1-gpu-py37-cu102-ubuntu18.04 |
| 6 | + |
| 7 | +# The PR CI Uses: |
| 8 | + # 763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:2.3.1-gpu-py37-cu110-ubuntu18.04 |
| 9 | + |
| 10 | +version: 0.2 |
| 11 | +env: |
| 12 | + variables: |
| 13 | + run_pytest_pytorch: "disable" |
| 14 | + run_pytest_mxnet: "disable" |
| 15 | + run_pytest_tensorflow: "disable" |
| 16 | + run_pytest_tensorflow2: "enable" |
| 17 | + run_pytest_xgboost: "disable" |
| 18 | + run_pytest_profiler: "enable" |
| 19 | + run_integration_pytest_pytorch: "disable" |
| 20 | + run_integration_pytest_mxnet: "disable" |
| 21 | + run_integration_pytest_tensorflow: "disable" |
| 22 | + run_integration_pytest_tensorflow2: "enable" |
| 23 | + run_integration_pytest_xgboost: "disable" |
| 24 | + # below needs to be enabled |
| 25 | + zero_code_change_test: "enable" |
| 26 | + # set code coverage flag |
| 27 | + code_coverage_smdebug: "true" |
| 28 | +phases: |
| 29 | + install: |
| 30 | + commands: |
| 31 | + - . config/change_branch.sh |
| 32 | + - su && apt-get update |
| 33 | + - apt-get install sudo -qq -o=Dpkg::Use-Pty=0 # silence output: https://askubuntu.com/a/668859/724247 |
| 34 | + - sudo apt-get update -qq -o=Dpkg::Use-Pty=0 |
| 35 | + - sudo apt-get install unzip -qq -o=Dpkg::Use-Pty=0 |
| 36 | + - cd $CODEBUILD_SRC_DIR && chmod +x config/protoc_downloader.sh && ./config/protoc_downloader.sh |
| 37 | + - pip install --upgrade pip==19.3.1 |
| 38 | + - pip install -q matplotlib==3.3.1 seaborn==0.10.1 nbconvert==5.6.1 papermill==2.1.2 jupyter==1.0.0 scipy==1.5.2 scikit-learn==0.23.2 bokeh==2.2.3 simplejson==3.17.2 transformers==4.2.1 |
| 39 | + - pip install -q pytest wheel pytest-html pre-commit awscli pytest-cov |
| 40 | + |
| 41 | + pre_build: |
| 42 | + commands: |
| 43 | + - cd $CODEBUILD_SRC_DIR |
| 44 | + |
| 45 | + build: |
| 46 | + commands: |
| 47 | + - cd $CODEBUILD_SRC_DIR && python setup.py bdist_wheel --universal |
| 48 | + # We do not need to force install smdebug-rules. The container used for PR builds do not have smdebug rules binary. |
| 49 | + # Force installing rules binary attempts to re-install ipython-genutils which fails on PyTorch Ubuntu 16.04 containers. |
| 50 | + - cd $RULES_CODEBUILD_SRC_DIR && python setup.py bdist_wheel --universal |
| 51 | + - cd $CODEBUILD_SRC_DIR && pip install --force-reinstall dist/*.whl && cd .. |
| 52 | + - pip install --force-reinstall numpy==1.18.5 |
| 53 | + - cd $CODEBUILD_SRC_DIR && chmod +x config/tests.sh && PYTHONPATH=. && ./config/tests.sh && mkdir -p upload/$CURRENT_COMMIT_PATH/wheels && cp ./dist/*.whl upload/$CURRENT_COMMIT_PATH/wheels && cd .. |
| 54 | + - pip show smdebug |
| 55 | + - echo 'Uploading Coverage to CodeCov' |
| 56 | + - bash $CODEBUILD_SRC_DIR/config/codecov.sh |
| 57 | + - cd $RULES_CODEBUILD_SRC_DIR && chmod +x config/tests.sh && PYTHONPATH=. && mkdir -p upload/$CURRENT_COMMIT_PATH/wheels && ./config/tests.sh && cp ./dist/*.whl upload/$CURRENT_COMMIT_PATH/wheels && cd .. |
| 58 | + |
| 59 | + post_build: |
| 60 | + commands: |
| 61 | + - . $CODEBUILD_SRC_DIR/config/upload_on_end.sh |
| 62 | + - rm -rf $CODEBUILD_SRC_DIR/upload/$CURRENT_COMMIT_PATH |
| 63 | + - rm -rf $RULES_CODEBUILD_SRC_DIR/upload/$CURRENT_COMMIT_PATH |
| 64 | + - if [ "$CODEBUILD_BUILD_SUCCEEDING" -eq 0 ]; then echo "ERROR BUILD FAILED " && exit 1 ; fi |
| 65 | + - if [ "$CODEBUILD_BUILD_SUCCEEDING" -eq 1 ]; then echo "INFO BUILD SUCCEEDED !!! " ; fi |
0 commit comments