Skip to content

Commit faf0b83

Browse files
committed
fix installation process
1 parent f711efc commit faf0b83

File tree

3 files changed

+8
-17
lines changed

3 files changed

+8
-17
lines changed

.github/container/Dockerfile.axlearn

-6
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,6 @@ seqio==0.0.18
2525
protobuf==3.20.3
2626
pytest>=7.4.3
2727
REQUIREMENTS
28-
# Only append "tensorflow-cpu" if running on x86_64
29-
if [ "$(uname -m)" = "x86_64" ]; then
30-
echo "tensorflow-cpu" >> /opt/pip-tools.d/requirements-axlearn.in
31-
else
32-
echo "Skipping TF on $(uname -m)"
33-
fi
3428
EOF
3529

3630

.github/container/pip-finalize.sh

+6-9
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,12 @@ if [[ $(echo -n "$unpinned_vcs_dependencies" | wc -l) -gt 0 ]]; then
4646
exit 1
4747
fi
4848

49-
# Replace any tensorflow==X with tensorflow-cpu==X in requirements.txt
50-
sed -i 's/^tensorflow==\([0-9.*]\+\)$/tensorflow-cpu==\1/' requirements.txt
51-
52-
# Replace any torch==Y with torch==Y+cpu in requirements.txt
53-
sed -i 's/^torch==\([0-9.*]\+\)$/torch==\1+cpu/' requirements.txt
54-
55-
# Add the --find-links option for PyTorch wheels
56-
echo "--find-links https://download.pytorch.org/whl/torch" >> requirements.txt
57-
49+
# Replace any tensorflow==X with tensorflow-cpu==X in requirements.txt only on amd64
50+
if [ "$(uname -m)" = "x86_64" ]; then
51+
sed -i 's/^tensorflow==\([0-9.*]\+\)$/tensorflow-cpu==\1/' requirements.txt
52+
else
53+
echo "Skipping TF on $(uname -m)"
54+
fi
5855
# --no-deps is required since conflicts can still appear during pip-sync
5956
pip-sync --pip-args '--no-deps --src /opt' requirements.txt
6057

.github/container/test-axlearn.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ cd "$DIR" || exit 1
9393

9494
echo "Running tests..."
9595

96-
pip install transformers --no-deps
97-
pip install scikit-learn timm
96+
pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
97+
pip install timm transformers scikit-learn
9898

9999

100100
if [ "${#TEST_FILES[@]}" -eq 0 ]; then

0 commit comments

Comments
 (0)