This document introduces how to build BladeDISC from source, to make the installation and configuration easier, we provide a Dockerfile that contains required software to build and test.
- Git for checking out the source code.
- Nvidia Docker to launch Docker container on Nvidia GPU host.
git clone git@github.com:alibaba/BladeDISC.git
cd BladeDISC && git submodule update --init --recursive
-
step1: launch a development Docker container that runs a development Docker image.
docker run --gpus all --rm -it -v $PWD:/disc bladedisc/bladedisc:latest-devel-cuda11.0 bash
please goto this website to find more images with various CUDA versions.
-
step2: build and test tensorflow_bladedisc with an all-in-on bash script.
bash ./scripts/ci/build_and_test.sh
the above command generates a wheel Python package on the path:
./build
, please free feel to install it with the pip installation toolkit.
-
step1: launch a development Docker container that runs a development Docker image.
docker run --gpus all --rm -it -v $PWD:/disc bladedisc/bladedisc:latest-devel-cuda11.0 bash
-
step2: build and test pytorch_blade with an all-in-one script:
cd pytorch_blade && bash ./ci_build/build_pytorch_blade.sh
-
step3: build the pytorch_blade Python wheel package.
python setup.py bdist_wheel
the above command generates a wheel Python package on the path:
pytorch_blade/dist/
, please install it with the pip installation toolkit.