forked from tensorflow/tensorflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify local reproduction instructions
This change is a big simplification of reproducing a build locally: - Moved a lot of configurable behavior into source-able local_* env files - Deleted a lot of extraneous instructions - Added "how do I choose..." instructions for clarification - Fixed a bug preventing multiple invocations of rename_and_verify_wheels - Made any.sh and bisect.sh use the cleaner method of sourcing local_ envs - Cleaned up ci_default and added "how to see an overview of env variables" One of the big things is that I added some logic in local_default that resets the list of Bazel common args to remove things like --config=rbe. This way a user can choose to run a "release" env configuration without being blocked by permission errors, or by needing to manually amend their configuration. As a result, gathering the correct set of config values is quite easy (see the new instructions). The alternative would be to split "auth-related" flags into a separate variable, which I don't like, as I think it's more confusing for future maintainers to have to continuously decide which options go where.
- Loading branch information
Showing
9 changed files
with
171 additions
and
294 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,22 @@ | ||
# Base settings for a local execution | ||
# Don't generate the summary index | ||
TFCI_INDEX_HTML_ENABLE= | ||
# Defining this variable as empty will overwrite "hey, that's empty" errors | ||
KOKORO_KEYSTORE_DIR= | ||
# Don't try and upload anything, since permissions won't work anyway | ||
source ci/official/envs/disable_all_uploads | ||
# Remove execution-affecting arguments from the TFCI_BAZEL_COMMON_ARGS value | ||
# so that other local_ envs can add whatever they want. This seems easier | ||
# than trying to juggle different environment variables for it. | ||
function localize_bazel_args() { | ||
echo "$TFCI_BAZEL_COMMON_ARGS" | sed \ | ||
-e 's/--config tf_public_cache_push//g' \ | ||
-e 's/--config tf_public_macos_cache_push//g' \ | ||
-e 's/--config tf_public_cache//g' \ | ||
-e 's/--config tf_public_macos_cache//g' \ | ||
-e 's/--config resultstore//g' \ | ||
-e 's/--config rbe//g' | ||
} | ||
# Other envs can now use: | ||
# TFCI_BAZEL_COMMON_ARGS="$TFCI_BAZEL_COMMON_ARGS <other args>" | ||
TFCI_BAZEL_COMMON_ARGS=$(localize_bazel_args) |
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,7 @@ | ||
# Combine TF public build cache and local disk cache | ||
# The cache configs are different for MacOS and Linux | ||
if [[ $(uname -s) == "Darwin" ]]; then | ||
TFCI_BAZEL_COMMON_ARGS="$TFCI_BAZEL_COMMON_ARGS --config tf_public_macos_cache --disk_cache=$TFCI_OUTPUT_DIR/cache" | ||
else | ||
TFCI_BAZEL_COMMON_ARGS="$TFCI_BAZEL_COMMON_ARGS --config tf_public_cache --disk_cache=$TFCI_OUTPUT_DIR/cache" | ||
fi |
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,2 @@ | ||
# Disable Docker | ||
TFCI_DOCKER_ENABLE=0 |
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,3 @@ | ||
# Use RBE and Resultstore. If using Docker, requires passthrough of gcloud credentials. | ||
TFCI_DOCKER_ARGS="$TFCI_DOCKER_ARGS -v $HOME/.config/gcloud:/root/.config/gcloud" | ||
TFCI_BAZEL_COMMON_ARGS="$TFCI_BAZEL_COMMON_ARGS --config rbe" |
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