celeste-zeng commented on code in PR #27723: URL: https://github.com/apache/beam/pull/27723#discussion_r1279878767
########## sdks/python/container/run_generate_requirements.sh: ########## @@ -104,4 +104,16 @@ EOT # Remove pkg_resources to guard against # https://stackoverflow.com/questions/39577984/what-is-pkg-resources-0-0-0-in-output-of-pip-freeze-command pip freeze | grep -v pkg_resources >> "$REQUIREMENTS_FILE" + +# Check if the generated .txt file has the line "tensorflow==". +if grep -q "tensorflow==" "$REQUIREMENTS_FILE"; then + +# Get the version of tensorflow from the .txt file. +VERSION=$(grep -Po "tensorflow==\K[^;]+" "$REQUIREMENTS_FILE") + +# Write the line tensorflow-cpu-aws==${VERSION};platform_machine=="aarch64" to the .txt file. +echo "tensorflow-cpu-aws==${VERSION};platform_machine==\"aarch64\"" >> "$REQUIREMENTS_FILE" Review Comment: Added this change and reran `./gradlew :sdks:python:container:py38:generatePythonRequirements ` to test, worked! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
