Skip to content

Latest commit

 

History

History
58 lines (37 loc) · 2.7 KB

README.md

File metadata and controls

58 lines (37 loc) · 2.7 KB

Purpose

This script is designed for developer and contributor use. This tool mimics the actions of gpuCI on your local machine. This allows you to test and even debug your code inside a gpuCI base container before pushing your code as a GitHub commit. The script can be helpful in locally triaging and debugging RAPIDS continuous integration failures.

Requirements

nvidia-docker

Usage

bash build.sh [-h] [-H] [-s] [-r <repo_dir>] [-i <image_name>]
Build and test your local repository using a base gpuCI Docker image

where:
    -H   Show this help text
    -r   Path to repository (defaults to working directory)
    -i   Use Docker image (default is gpuci/rapidsai:${NIGHTLY_VERSION}-cuda10.1-devel-ubuntu16.04-py3.7)
    -s   Skip building and testing and start an interactive shell in a container of the Docker image

Example Usage: bash build.sh -r ~/rapids/cugraph -i gpuci/rapidsai:0.16-cuda10.2-devel-ubuntu16.04-py3.7

For a full list of available gpuCI docker images, visit our DockerHub page.

Style Check:

$ bash ci/local/build.sh -r ~/rapids/cugraph -s
$ source activate rapids    # Activate gpuCI conda environment
$ cd rapids
$ flake8 python

Information

There are some caveats to be aware of when using this script, especially if you plan on developing from within the container itself.

Docker Image Build Repository

The docker image will generate build artifacts in a folder on your machine located in the root directory of the repository you passed to the script. For the above example, the directory is named ~/rapids/cugraph/build_rapidsai_cuda10.1-ubuntu16.04-py3.7/. Feel free to remove this directory after the script is finished.

Note: The script will not override your local build repository. Your local environment stays in tact.

Where The User is Dumped

The script will build your repository and run all tests. If any tests fail, it dumps the user into the docker container itself to allow you to debug from within the container. If all the tests pass as expected the container exits and is automatically removed. Remember to exit the container if tests fail and you do not wish to debug within the container itself.

If you would like to rerun the tests after changing some code in the container, run bash ci/gpu/build.sh.

Container File Structure

Your repository will be located in the /rapids/ folder of the container. This folder is volume mounted from the local machine. Any changes to the code in this repository are replicated onto the local machine. The cpp/build and python/build directories within your repository is on a separate mount to avoid conflicting with your local build artifacts.