mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Fix python resolution in caffe2 CI scripts
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/18417 Differential Revision: D14612704 Pulled By: bddppq fbshipit-source-id: 0942048a9c3990afc50ce73c1fa1005c4d4097aa
This commit is contained in:
committed by
Facebook Github Bot
parent
bf2a30cb22
commit
a729630cbf
@ -14,7 +14,7 @@ else
|
||||
num_gpus=0
|
||||
fi
|
||||
|
||||
caffe2_pypath="$(cd /usr && python -c 'import os; import caffe2; print(os.path.dirname(os.path.realpath(caffe2.__file__)))')"
|
||||
caffe2_pypath="$(cd /usr && $PYTHON -c 'import os; import caffe2; print(os.path.dirname(os.path.realpath(caffe2.__file__)))')"
|
||||
# Resnet50
|
||||
if (( $num_gpus == 0 )); then
|
||||
"$PYTHON" "$caffe2_pypath/python/examples/resnet50_trainer.py" --train_data null --batch_size 128 --epoch_size 12800 --num_epochs 2 --use_cpu
|
||||
|
@ -17,7 +17,7 @@ else
|
||||
# For Python builds we install into python
|
||||
# cd to /usr first so the python import doesn't get confused by any 'caffe2'
|
||||
# directory in cwd
|
||||
python_installation="$(dirname $(dirname $(cd /usr && python -c 'import os; import caffe2; print(os.path.realpath(caffe2.__file__))')))"
|
||||
python_installation="$(dirname $(dirname $(cd /usr && $PYTHON -c 'import os; import caffe2; print(os.path.realpath(caffe2.__file__))')))"
|
||||
caffe2_pypath="$python_installation/caffe2"
|
||||
cpp_test_dir="$python_installation/torch/test"
|
||||
ld_library_path="$python_installation/torch/lib"
|
||||
|
Reference in New Issue
Block a user