[torch/deploy] remove usage of fbcode_dir (#57102)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/57102
We don't actually need to peek into `--fbcode_dir` for this. There are two reasons we should avoid this:
1. The [`TARGETS` docs](https://fburl.com/wiki/zz1wh6uc) recommend against it, as it can break buck caching and dependency tracking. This doesn't seem to be a serious issue in our case (we declare our sources anyway) but worth respecting.
2. More seriously, if we want to use this script from outside fbcode (like `fbsource/third-party/pypi`), it will break since `fbcode_dir` gets set to something wild
The preferred method is apparently to use `$SRCDIR`, which represents a directory that all specified sources are copied to before exexcuting the custom rule.
Found the suggestion here: https://fburl.com/w33wae2b. Seems less fragile, since it's publically documented as well: https://buck.build/rule/genrule.html
Test Plan: sandcastle
Reviewed By: wconstab
Differential Revision: D28052570
fbshipit-source-id: cb4772b5dc07fbdc251249d6e0759e71730098af