File tree 3 files changed +8
-17
lines changed
3 files changed +8
-17
lines changed Original file line number Diff line number Diff line change @@ -25,12 +25,6 @@ seqio==0.0.18
25
25
protobuf==3.20.3
26
26
pytest>=7.4.3
27
27
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
34
28
EOF
35
29
36
30
Original file line number Diff line number Diff line change @@ -46,15 +46,12 @@ if [[ $(echo -n "$unpinned_vcs_dependencies" | wc -l) -gt 0 ]]; then
46
46
exit 1
47
47
fi
48
48
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
58
55
# --no-deps is required since conflicts can still appear during pip-sync
59
56
pip-sync --pip-args ' --no-deps --src /opt' requirements.txt
60
57
Original file line number Diff line number Diff line change @@ -93,8 +93,8 @@ cd "$DIR" || exit 1
93
93
94
94
echo " Running tests..."
95
95
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
98
98
99
99
100
100
if [ " ${# TEST_FILES[@]} " -eq 0 ]; then
You can’t perform that action at this time.
0 commit comments