Skip to content

Instantly share code, notes, and snippets.

@hillct
Last active July 31, 2023 20:06
Show Gist options
  • Save hillct/42045e9664834f8c666017d82fa276dd to your computer and use it in GitHub Desktop.
Save hillct/42045e9664834f8c666017d82fa276dd to your computer and use it in GitHub Desktop.
Docker file for building/testing the bitsandbytes python library on Jetson family SOMs
FROM nvcr.io/nvidia/l4t-pytorch:r35.2.1-pth2.0-py3
RUN apt-get update && apt-get install -y --no-install-recommends python3-pip python-is-python3 libcudnn8 libopenblas-dev \
libopenmpi-dev cuda-cupti-11-4 git
RUN python -m pip install --upgrade pip pytest einops scipy
WORKDIR /app
COPY . .
RUN CUDA_VERSION=114 make cuda11x && python setup.py install
ENTRYPOINT ["/bin/bash"]
@blizzn
Copy link

blizzn commented Jul 31, 2023

For the protobuf issue, you can add a command to install protobuf via pip:

Dockerfile

RUN pip install protobuf>=3.3.0

For the numpy issue, you can try installing numpy again before other packages that may depend on it:

Dockerfile

RUN pip install numpy==1.24.4

You can also use the --ignore-installed flag with pip install to ignore the system-wide installations of pip and numpy:

Dockerfile

RUN pip install --ignore-installed pip numpy

Add these before the line RUN python -m pip install --upgrade pip pytest einops scipy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment