@@ -797,22 +797,23 @@ binary_linux_upload: &binary_linux_upload
797
797
source /home/circleci/project/env
798
798
declare -x "AWS_ACCESS_KEY_ID=${PYTORCH_BINARY_AWS_ACCESS_KEY_ID}"
799
799
declare -x "AWS_SECRET_ACCESS_KEY=${PYTORCH_BINARY_AWS_SECRET_ACCESS_KEY}"
800
- declare -x "CONDA_USERNAME=${PYTORCH_BINARY_PJH5_CONDA_USERNAME}"
801
- declare -x "CONDA_PASSWORD=${PYTORCH_BINARY_PJH5_CONDA_PASSWORD}"
800
+ cat >/home/circleci/project/login_to_anaconda.sh <<EOL
801
+ set +x
802
+ echo "Trying to login to Anaconda"
803
+ yes | anaconda login \
804
+ --username "$PYTORCH_BINARY_PJH5_CONDA_USERNAME" \
805
+ --password "$PYTORCH_BINARY_PJH5_CONDA_PASSWORD"
806
+ set -x
807
+ EOL
808
+ chmod +x /home/circleci/project/login_to_anaconda.sh
802
809
set -ex
803
810
export PATH="$MINICONDA_ROOT/bin:$PATH"
804
811
805
812
# Upload the package to the final location
806
813
pushd /home/circleci/project/final_pkgs
807
814
if [[ "$PACKAGE_TYPE" == conda ]]; then
808
815
retry conda install -yq anaconda-client
809
- set +x
810
- echo 'If there is no more output then logging into Anaconda failed'
811
- retry timeout 120 \
812
- yes | anaconda login \
813
- --username "$CONDA_USERNAME" \
814
- --password "$CONDA_PASSWORD"
815
- set -x
816
+ retry timeout 30 /home/circleci/project/login_to_anaconda.sh
816
817
anaconda upload "$(ls)" -u pytorch --label main --no-progress --force
817
818
elif [[ "$PACKAGE_TYPE" == libtorch ]]; then
818
819
retry pip install -q awscli
@@ -925,21 +926,23 @@ binary_mac_upload: &binary_mac_upload
925
926
command : |
926
927
export AWS_ACCESS_KEY_ID="${PYTORCH_BINARY_AWS_ACCESS_KEY_ID}"
927
928
export AWS_SECRET_ACCESS_KEY="${PYTORCH_BINARY_AWS_SECRET_ACCESS_KEY}"
928
- export CONDA_USERNAME="${PYTORCH_BINARY_PJH5_CONDA_USERNAME}"
929
- export CONDA_PASSWORD="${PYTORCH_BINARY_PJH5_CONDA_PASSWORD}"
929
+ cat >/Users/distiller/project/login_to_anaconda.sh <<EOL
930
+ set +x
931
+ echo "Trying to login to Anaconda"
932
+ yes | anaconda login \
933
+ --username "$PYTORCH_BINARY_PJH5_CONDA_USERNAME" \
934
+ --password "$PYTORCH_BINARY_PJH5_CONDA_PASSWORD"
935
+ set -x
936
+ EOL
937
+ chmod +x /Users/distiller/project/login_to_anaconda.sh
930
938
set -ex
931
939
source "/Users/distiller/project/env"
932
940
export "PATH=$workdir/miniconda/bin:$PATH"
933
941
934
942
pushd "$workdir/final_pkgs"
935
943
if [[ "$PACKAGE_TYPE" == conda ]]; then
936
944
retry conda install -yq anaconda-client
937
- set +x
938
- echo 'If there is no more output then logging into Anaconda failed'
939
- retry yes | anaconda login \
940
- --username "$CONDA_USERNAME" \
941
- --password "$CONDA_PASSWORD"
942
- set -x
945
+ retry /Users/distiller/project/login_to_anaconda.sh
943
946
retry anaconda upload "$(ls)" -u pytorch --label main --no-progress --force
944
947
elif [[ "$PACKAGE_TYPE" == libtorch ]]; then
945
948
retry pip install -q awscli
0 commit comments