mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Summary: New pip package becomes more restricted. We need to add extra flag to make the installation work. Pull Request resolved: https://github.com/pytorch/pytorch/pull/19725 Differential Revision: D15078698 Pulled By: houseroad fbshipit-source-id: bbd782a0c913b5a1db3e9333de1ca7d88dc312f1
19 lines
488 B
Bash
Executable File
19 lines
488 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
# realpath might not be available on MacOS
|
|
script_path=$(python -c "import os; import sys; print(os.path.realpath(sys.argv[1]))" "${BASH_SOURCE[0]}")
|
|
top_dir=$(dirname $(dirname $(dirname "$script_path")))
|
|
tp2_dir="$top_dir/third_party"
|
|
|
|
pip install ninja
|
|
|
|
# Install onnx
|
|
pip install --no-use-pep517 -e "$tp2_dir/onnx"
|
|
|
|
# Install caffe2 and pytorch
|
|
pip install -r "$top_dir/caffe2/requirements.txt"
|
|
pip install -r "$top_dir/requirements.txt"
|
|
python setup.py develop
|