update bitsandbytes build system
This commit is contained in:
parent
00ca459ba4
commit
2471c3de53
@ -27,6 +27,7 @@ RUN pip3 install -r requirements-dev.txt
|
|||||||
## Build
|
## Build
|
||||||
RUN cmake -DCOMPUTE_BACKEND=hip -S . -DBNB_ROCM_ARCH=${ROCM_ARCH}
|
RUN cmake -DCOMPUTE_BACKEND=hip -S . -DBNB_ROCM_ARCH=${ROCM_ARCH}
|
||||||
RUN make
|
RUN make
|
||||||
|
RUN python3 setup.py bdist_wheel --universal
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
RUN apt-get clean && pip3 cache purge
|
RUN apt-get clean && pip3 cache purge
|
16
bitsandbytes-rocm-build/README.md
Normal file
16
bitsandbytes-rocm-build/README.md
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# bitsandbytes-rocm-build-pip
|
||||||
|
|
||||||
|
This is a simple script to help you build the latest bitsandbytes for rocm.
|
||||||
|
The official build process requires a lot of ROCM-related packages and can mess up your computer easily if you install the wrong packages.
|
||||||
|
|
||||||
|
This creates a Docker image that builds the package and extract the built wheel file that you can then easily install using pip.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./build.sh
|
||||||
|
./extract_build.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
The wheel file will be in a folder named ``build_output/``
|
||||||
|
|
||||||
|
You can also find my latest build in the releases section.
|
||||||
|
|
0
bitsandbytes-rocm-build/build.sh
Normal file → Executable file
0
bitsandbytes-rocm-build/build.sh
Normal file → Executable file
@ -3,7 +3,7 @@
|
|||||||
# Set variables
|
# Set variables
|
||||||
IMAGE_NAME="bitsandbytes-rocm-build:6.1.2"
|
IMAGE_NAME="bitsandbytes-rocm-build:6.1.2"
|
||||||
CONTAINER_NAME="bitsandbytes-rocm-build"
|
CONTAINER_NAME="bitsandbytes-rocm-build"
|
||||||
FILE_IN_CONTAINER="/tmp/bitsandbytes"
|
FILE_IN_CONTAINER="/tmp/bitsandbytes/dist/"
|
||||||
FILE_ON_HOST="./build_output/"
|
FILE_ON_HOST="./build_output/"
|
||||||
|
|
||||||
# Run the Docker container
|
# Run the Docker container
|
||||||
@ -28,4 +28,4 @@ fi
|
|||||||
docker stop $CONTAINER_NAME
|
docker stop $CONTAINER_NAME
|
||||||
docker rm $CONTAINER_NAME
|
docker rm $CONTAINER_NAME
|
||||||
|
|
||||||
echo "Now you can install bitsandbytes locally using \"pip install .\" in the build_output/bitsandbytes folder"
|
echo "Now you can install bitsandbytes locally using \"pip install\" with the file in the build_output/ folder"
|
||||||
|
Loading…
Reference in New Issue
Block a user