Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

pre_build_script.sh 1.2 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
  1. #!/bin/bash
  2. if [[ "$(uname)" == Darwin ]]; then
  3. # Uninstall Conflicting jpeg brew formulae
  4. jpeg_packages=$(brew list | grep jpeg)
  5. echo "Existing Jpeg-related Brew libraries"
  6. echo $jpeg_packages
  7. for pkg in $jpeg_packages; do
  8. brew uninstall --ignore-dependencies --force $pkg || true
  9. done
  10. conda install -y wget
  11. fi
  12. if [[ "$(uname)" == Darwin || "$OSTYPE" == "msys" ]]; then
  13. conda install libpng libwebp -y
  14. # Installing webp also installs a non-turbo jpeg, so we uninstall jpeg stuff
  15. # before re-installing them
  16. conda uninstall libjpeg-turbo libjpeg -y
  17. conda install -y ffmpeg=4.2 -c pytorch
  18. conda install -y libjpeg-turbo -c pytorch
  19. # Copy binaries to be included in the wheel distribution
  20. if [[ "$OSTYPE" == "msys" ]]; then
  21. python_exec="$(which python)"
  22. bin_path=$(dirname $python_exec)
  23. cp "$bin_path/Library/bin/libjpeg.dll" torchvision
  24. fi
  25. else
  26. if [[ "$ARCH" == "aarch64" ]]; then
  27. conda install libpng -y
  28. conda install -y ffmpeg=4.2 libjpeg-turbo -c pytorch-nightly
  29. fi
  30. conda install libwebp -y
  31. conda install libjpeg-turbo -c pytorch
  32. yum install -y freetype gnutls
  33. pip install "auditwheel<6.3.0"
  34. fi
  35. pip install numpy pyyaml future ninja
  36. pip install --upgrade setuptools==72.1.0
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...