File tree Expand file tree Collapse file tree 4 files changed +65
-16
lines changed Expand file tree Collapse file tree 4 files changed +65
-16
lines changed Original file line number Diff line number Diff line change 77
88# Before doing anything, cd to the directory containing this script.
99cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null || /bin/true
10-
11- # Find the names of the python tools to use.
12- if [[ -z $PYTHON_EXECUTABLE ]];
13- then
14- if [[ -z $CONDA_DEFAULT_ENV ]] || [[ $CONDA_DEFAULT_ENV == " base" ]] || [[ ! -x " $( command -v python) " ]];
15- then
16- PYTHON_EXECUTABLE=python3
17- else
18- PYTHON_EXECUTABLE=python
19- fi
20- fi
21-
22- $PYTHON_EXECUTABLE ./install_executorch.py " $@ "
23-
24- # Exit with the same status as the python script.
25- exit $?
10+ ./run_python_script.sh ./install_executorch.py " $@ "
Original file line number Diff line number Diff line change 1+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2+ # Copyright 2024-25 Arm Limited and/or its affiliates.
3+ # All rights reserved.
4+ #
5+ # This source code is licensed under the BSD-style license found in the
6+ # LICENSE file in the root directory of this source tree.
7+
8+ import argparse
9+ import sys
10+
11+ import install_executorch
12+
13+
14+ def main (args ):
15+ parser = argparse .ArgumentParser ()
16+ parser .add_argument (
17+ "--use-pt-pinned-commit" ,
18+ action = "store_true" ,
19+ help = "build from the pinned PyTorch commit instead of nightly" ,
20+ )
21+ args = parser .parse_args (args )
22+ install_executorch .install_requirements (
23+ use_pytorch_nightly = not bool (args .use_pt_pinned_commit )
24+ )
25+
26+
27+ if __name__ == "__main__" :
28+ main (sys .argv [1 :])
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # Copyright (c) Meta Platforms, Inc. and affiliates.
3+ # All rights reserved.
4+ #
5+ # This source code is licensed under the BSD-style license found in the
6+ # LICENSE file in the root directory of this source tree.
7+
8+ # Before doing anything, cd to the directory containing this script.
9+ cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null || /bin/true
10+ ./run_python_script.sh ./install_requirements.py " $@ "
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # Copyright (c) Meta Platforms, Inc. and affiliates.
3+ # All rights reserved.
4+ #
5+ # This source code is licensed under the BSD-style license found in the
6+ # LICENSE file in the root directory of this source tree.
7+
8+ # Before doing anything, cd to the directory containing this script.
9+ cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null || /bin/true
10+
11+ # Find the names of the python tools to use.
12+ if [[ -z $PYTHON_EXECUTABLE ]];
13+ then
14+ if [[ -z $CONDA_DEFAULT_ENV ]] || [[ $CONDA_DEFAULT_ENV == " base" ]] || [[ ! -x " $( command -v python) " ]];
15+ then
16+ PYTHON_EXECUTABLE=python3
17+ else
18+ PYTHON_EXECUTABLE=python
19+ fi
20+ fi
21+
22+ SCRIPT=" $1 " ; shift
23+ $PYTHON_EXECUTABLE $SCRIPT " $@ "
24+
25+ # Exit with the same status as the python script.
26+ exit $?
You can’t perform that action at this time.
0 commit comments