-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge issue #260
Merged
Merged
Merge issue #260
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
2a9c3eb
Updated test paths
afender dee078c
added a script to get test datasets from s3
afender ebedef5
added readme for datasets
afender 237d265
Update README.md
afender fb0217a
improved the s3 script to set the dataset path
afender f25b128
Merge branch 'cpp_test_datasets' of github.com:afender/cugraph into c…
afender b64b192
Update README.md
afender 526ff8c
changelog remove extra new line
5c05049
changelog
a847327
changing tar.gz to tgz
afender 4db0b31
Merge branch 'cpp_test_datasets' of github.com:afender/cugraph into c…
afender 54b85b5
Merge remote-tracking branch 'upstream/branch-0.7' into localbuild
1e01f70
Update CONTRIBUTING
2f5a018
Add local build script
8b37c21
Updated the main readme
afender 90dd4f0
Add style check example
9fea2dd
Remove extra character in README
c958b6d
Merge branch 'branch-0.7' into cpp_test_datasets
afender d61a6b1
Update CHANGELOG.md
afender 294cfc2
add rmm to the conda configuration
ChuckHastings 55f08e3
update changelog
ChuckHastings ad5ddf8
try the technique cudf is using for managing conda environment
ChuckHastings afac161
Merge pull request #250 from dillon-cullinan/localbuild
BradReesWork e27af17
Merge pull request #252 from afender/cpp_test_datasets
BradReesWork 5e21bc7
Merge pull request #253 from ChuckHastings/bug_add_rmm
BradReesWork 109252c
add pip to the install, remove nightly files, update readme
ChuckHastings 98414b4
update CHANGELOG
ChuckHastings 7b47256
Merge pull request #256 from ChuckHastings/bug_add_pip
afender 7dbf41e
Merge remote-tracking branch 'upstream/branch-0.8' into merge_issue
afender File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
## 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-base:cuda10.0-ubuntu16.04-gcc5-py3.6) | ||
-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/cuda9.2-ubuntu16.04-gcc5-py3.6` | ||
|
||
For a full list of available gpuCI docker images, visit our [DockerHub](https://hub.docker.com/r/gpuci/rapidsai-base/tags) page. | ||
|
||
Style Check: | ||
```bash | ||
$ bash ci/local/build.sh -r ~/rapids/cugraph -s | ||
$ source activate gdf #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-base_cuda9.2-ubuntu16.04-gcc5-py3.6/`. 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. | ||
|
||
|
||
### 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
#!/bin/bash | ||
|
||
DOCKER_IMAGE="gpuci/rapidsai-base:cuda10.0-ubuntu16.04-gcc5-py3.6" | ||
REPO_PATH=${PWD} | ||
RAPIDS_DIR_IN_CONTAINER="/rapids" | ||
CPP_BUILD_DIR="cpp/build" | ||
PYTHON_BUILD_DIR="python/build" | ||
CONTAINER_SHELL_ONLY=0 | ||
|
||
SHORTHELP="$(basename $0) [-h] [-H] [-s] [-r <repo_dir>] [-i <image_name>]" | ||
LONGHELP="${SHORTHELP} | ||
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 ${DOCKER_IMAGE}) | ||
-s Skip building and testing and start an interactive shell in a container of the Docker image | ||
" | ||
|
||
# Limit GPUs available to container based on CUDA_VISIBLE_DEVICES | ||
if [[ -z "${CUDA_VISIBLE_DEVICES}" ]]; then | ||
NVIDIA_VISIBLE_DEVICES="all" | ||
else | ||
NVIDIA_VISIBLE_DEVICES=${CUDA_VISIBLE_DEVICES} | ||
fi | ||
|
||
while getopts ":hHr:i:s" option; do | ||
case ${option} in | ||
r) | ||
REPO_PATH=${OPTARG} | ||
;; | ||
i) | ||
DOCKER_IMAGE=${OPTARG} | ||
;; | ||
s) | ||
CONTAINER_SHELL_ONLY=1 | ||
;; | ||
h) | ||
echo "${SHORTHELP}" | ||
exit 0 | ||
;; | ||
H) | ||
echo "${LONGHELP}" | ||
exit 0 | ||
;; | ||
*) | ||
echo "ERROR: Invalid flag" | ||
echo "${SHORTHELP}" | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
REPO_PATH_IN_CONTAINER="${RAPIDS_DIR_IN_CONTAINER}/$(basename ${REPO_PATH})" | ||
CPP_BUILD_DIR_IN_CONTAINER="${RAPIDS_DIR_IN_CONTAINER}/$(basename ${REPO_PATH})/${CPP_BUILD_DIR}" | ||
PYTHON_BUILD_DIR_IN_CONTAINER="${RAPIDS_DIR_IN_CONTAINER}/$(basename ${REPO_PATH})/${PYTHON_BUILD_DIR}" | ||
|
||
|
||
# BASE_CONTAINER_BUILD_DIR is named after the image name, allowing for | ||
# multiple image builds to coexist on the local filesystem. This will | ||
# be mapped to the typical BUILD_DIR inside of the container. Builds | ||
# running in the container generate build artifacts just as they would | ||
# in a bare-metal environment, and the host filesystem is able to | ||
# maintain the host build in BUILD_DIR as well. | ||
BASE_CONTAINER_BUILD_DIR=${REPO_PATH}/build_$(echo $(basename ${DOCKER_IMAGE})|sed -e 's/:/_/g') | ||
CPP_CONTAINER_BUILD_DIR=${BASE_CONTAINER_BUILD_DIR}/cpp | ||
PYTHON_CONTAINER_BUILD_DIR=${BASE_CONTAINER_BUILD_DIR}/python | ||
|
||
|
||
BUILD_SCRIPT="#!/bin/bash | ||
set -e | ||
WORKSPACE=${REPO_PATH_IN_CONTAINER} | ||
PREBUILD_SCRIPT=${REPO_PATH_IN_CONTAINER}/ci/gpu/prebuild.sh | ||
BUILD_SCRIPT=${REPO_PATH_IN_CONTAINER}/ci/gpu/build.sh | ||
cd ${WORKSPACE} | ||
if [ -f \${PREBUILD_SCRIPT} ]; then | ||
source \${PREBUILD_SCRIPT} | ||
fi | ||
yes | source \${BUILD_SCRIPT} | ||
" | ||
|
||
if (( ${CONTAINER_SHELL_ONLY} == 0 )); then | ||
COMMAND="${CPP_BUILD_DIR_IN_CONTAINER}/build.sh || bash" | ||
else | ||
COMMAND="bash" | ||
fi | ||
|
||
# Create the build dir for the container to mount, generate the build script inside of it | ||
mkdir -p ${BASE_CONTAINER_BUILD_DIR} | ||
mkdir -p ${CPP_CONTAINER_BUILD_DIR} | ||
mkdir -p ${PYTHON_CONTAINER_BUILD_DIR} | ||
echo "${BUILD_SCRIPT}" > ${CPP_CONTAINER_BUILD_DIR}/build.sh | ||
chmod ugo+x ${CPP_CONTAINER_BUILD_DIR}/build.sh | ||
|
||
# Run the generated build script in a container | ||
docker pull ${DOCKER_IMAGE} | ||
docker run --runtime=nvidia --rm -it -e NVIDIA_VISIBLE_DEVICES=${NVIDIA_VISIBLE_DEVICES} \ | ||
--user $(id -u):$(id -g) \ | ||
-v ${REPO_PATH}:${REPO_PATH_IN_CONTAINER} \ | ||
-v ${CPP_CONTAINER_BUILD_DIR}:${CPP_BUILD_DIR_IN_CONTAINER} \ | ||
-v ${PYTHON_CONTAINER_BUILD_DIR}:${PYTHON_BUILD_DIR_IN_CONTAINER} \ | ||
--cap-add=SYS_PTRACE \ | ||
${DOCKER_IMAGE} bash -c "${COMMAND}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be in a new Release 0.8 section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same for the Improvements and Bug Fixs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so these are 0.7 changes that were already merged in 0.7.
Recall that this PR is just manually doing what 0.7->0.8 integration that GitHub couldn't do automatically.