File tree Expand file tree Collapse file tree
ML-Frameworks/pytorch-aarch64 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,9 +50,4 @@ torch_wheel_name=$(grep -o "torch-.*.whl" $build_log | head -n -1 | tail -n 1)
5050# Use the second to last match, otherwise grep finds itself
5151torch_ao_wheel_name=$( grep -o " torchao-.*.whl" $build_log | head -n -1 | tail -n 1)
5252
53- docker build -t toolsolutions-pytorch:latest \
54- --build-arg TORCH_WHEEL=results/$torch_wheel_name \
55- --build-arg DOCKER_IMAGE_MIRROR \
56- --build-arg TORCH_AO_WHEEL=ao/dist/$torch_ao_wheel_name \
57- --build-arg USERNAME=ubuntu \
58- .
53+ ./dockerize.sh " results/$torch_wheel_name " " ao/dist/$torch_ao_wheel_name " --build-only
Original file line number Diff line number Diff line change 1717# limitations under the License.
1818# *******************************************************************************
1919
20- help_str=" dockerize.sh takes a PyTorch wheel as the first argument and an ao wheel as second argument. It \
21- installs the wheel inside a Docker container with examples and requirements."
22- if [ " $# " -ne 2 ]; then
20+ help_str=" dockerize.sh takes a PyTorch wheel as the first argument and an ao wheel
21+ as the second argument. It installs the wheel inside a Docker container with examples
22+ and requirements. The docker image will then be run unless you pass in the optional
23+ --build-only argument"
24+
25+ if [ " $# " -lt 2 ]; then
2326 echo $help_str
2427 exit 1
2528fi
2629
2730if ! [ -e " $1 " ] || ! [ -e " $2 " ]; then
28- echo " I couldn't find a wheel at $1 or $2 "
31+ echo " I couldn't find wheels at $1 and $2 "
2932 echo $help_str
3033 exit 1
3134fi
@@ -34,5 +37,8 @@ docker build -t toolsolutions-pytorch:latest \
3437 --build-arg TORCH_WHEEL=$1 \
3538 --build-arg DOCKER_IMAGE_MIRROR \
3639 --build-arg TORCH_AO_WHEEL=$2 \
40+ --build-arg USERNAME=ubuntu \
3741 .
42+
43+ [[ $* == * --build-only* ]] && exit 0
3844docker run --rm -it toolsolutions-pytorch:latest
You can’t perform that action at this time.
0 commit comments