You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

BUILD_PYTHON_WHL_README.md 1.1 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # python whl package build support status
  2. * windows build (not ok)
  3. * linux build (ok, cpu or gpu)
  4. * macos build (ok,cpu only)
  5. # build env prepare
  6. ## linux
  7. ```
  8. 1: enable rootless docker env, refs: https://docs.docker.com/engine/security/rootless/
  9. 2: cd ./scripts/whl/linux/manylinux2010
  10. 3: ./build_image.sh cpu
  11. 4: ./build_image.sh cuda
  12. ```
  13. ## macos
  14. ```
  15. ./scripts/whl/macos/macos_whl_env_prepare.sh
  16. ```
  17. # how to build
  18. ## build for linux
  19. MegBrain delivers `wheel` package with `manylinux2010` tag defined in [PEP-571](https://www.python.org/dev/peps/pep-0571/).
  20. ```
  21. ./build_wheel.sh cpu
  22. CUDA_ROOT_DIR=/path/to/cuda \
  23. CUDNN_ROOT_DIR=/path/to/cudnn \
  24. TENSORRT_ROOT_DIR=/path/to/tensorrt \
  25. ./build_wheel.sh cuda
  26. ```
  27. And you can find all of the outputs in `output` directory.
  28. If you just want to build for a specific Python verison, you can use `ALL_PYTHON` environment variable. eg:
  29. ```
  30. ALL_PYTHON=35m ./build_wheel.sh cpu
  31. ```
  32. ## build for macos
  33. ```
  34. ./scripts/whl/macos/macos_build_whl.sh
  35. ```

MegEngine 安装包中集成了使用 GPU 运行代码所需的 CUDA 环境,不用区分 CPU 和 GPU 版。 如果想要运行 GPU 程序,请确保机器本身配有 GPU 硬件设备并安装好驱动。 如果你想体验在云端 GPU 算力平台进行深度学习开发的感觉,欢迎访问 MegStudio 平台