Skip to content

Commit a2de33c

Browse files
updated dockerfile
1 parent ddf0d4d commit a2de33c

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.github/scripts/ppc64le-build.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env bash
2+
3+
# Environment variables
4+
PACKAGE_NAME=pytorch
5+
PACKAGE_VERSION=${PACKAGE_VERSION:-v2.4.0}
6+
7+
cd /workspace/$PACKAGE_NAME
8+
9+
# Build and install PyTorch wheel
10+
if ! (MAX_JOBS=$(nproc) python setup.py bdist_wheel && pip install dist/*.whl); then
11+
echo "------------------$PACKAGE_NAME:install_fails-------------------------------------"
12+
exit 1
13+
fi
14+
15+
# Basic test to ensure installation success
16+
pip install pytest
17+
if ! pytest test/test_utils.py; then
18+
echo "------------------$PACKAGE_NAME:install_success_but_test_fails---------------------"
19+
exit 2
20+
else
21+
echo "------------------$PACKAGE_NAME:install_&_test_both_success-------------------------"
22+
exit 0
23+
fi

.github/workflows/Dockerfile.ppc64le

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ RUN chmod +x /ppc64le-build.sh
2121

2222
# Verify permissions and ensure Unix line endings
2323
RUN dos2unix /ppc64le-build.sh || sed -i 's/\r$//' /ppc64le-build.sh
24+
RUN chmod +x /ppc64le-build.sh
2425

2526
# Use CMD to run the script
2627
CMD ["/ppc64le-build.sh"]

0 commit comments

Comments
 (0)