forked from pytorch/pytorch
-
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.
Update buck_setup.sh (pytorch#80467)
Add a parameter for proxy setup when running this script in devserver Pull Request resolved: pytorch#80467 Approved by: https://github.com/malfet
- Loading branch information
1 parent
5fc2d45
commit d32ab80
Showing
1 changed file
with
18 additions
and
9 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,37 @@ | ||
#!/bin/bash | ||
printf "\n[Creating .buckconfig]\n" | ||
printf "\nCreating .buckconfig\n" | ||
cp .buckconfig.oss .buckconfig | ||
|
||
PROXY="" | ||
if [ "$1" == "devserver" ]; then | ||
echo -e '\n[download]\n proxy_host=fwdproxy\n proxy_port=8080\n proxy_type=HTTP\n' >> .buckconfig | ||
PROXY="$(fwdproxy-config curl)" | ||
printf "using proxy $PROXY\n\n" | ||
fi | ||
|
||
cat .buckconfig | ||
|
||
cd third_party || return | ||
|
||
printf "\n[Generating wrappers for cpuionfo]\n" | ||
printf "\nGenerating cpuinfo wrappers\n" | ||
python3 generate-cpuinfo-wrappers.py | ||
|
||
printf "\n[Generating wrappers for xnnpack]\n" | ||
printf "\nGenerating xnnpack wrappers\n" | ||
python3 generate-xnnpack-wrappers.py | ||
|
||
# bazel-skylib | ||
printf "\n[Downloading bazel-skylib-1.0.2]\n" | ||
printf "\nDownloading bazel-skylib\n" | ||
rm -rf bazel-skylib; mkdir bazel-skylib | ||
curl -L https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz|tar zx -C bazel-skylib | ||
curl -L $PROXY https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz|tar zx -C bazel-skylib | ||
|
||
# glog | ||
printf "\n[Downloading glog-0.4.0]\n" | ||
printf "\nDownloading glog\n" | ||
rm -rf glog; mkdir glog | ||
curl -L https://github.com/google/glog/archive/v0.4.0.tar.gz | tar zx -C glog --strip-components 1 | ||
curl -L $PROXY https://github.com/google/glog/archive/v0.4.0.tar.gz | tar zx -C glog --strip-components 1 | ||
|
||
# ruy | ||
printf "\n[Downloading ruy]\n" | ||
curl -L -o /tmp/ruy.zip https://github.com/google/ruy/archive/a09683b8da7164b9c5704f88aef2dc65aa583e5d.zip | ||
printf "\nDownloading ruy\n" | ||
curl -L $PROXY -o /tmp/ruy.zip https://github.com/google/ruy/archive/a09683b8da7164b9c5704f88aef2dc65aa583e5d.zip | ||
unzip -q /tmp/ruy.zip -d /tmp/ | ||
rm -rf ruy/ | ||
mv /tmp/ruy-a09683b8da7164b9c5704f88aef2dc65aa583e5d ruy/ |