|
FROM ubuntu:22.04 |
|
|
|
ENV DEBIAN_FRONTEND=noninteractive |
|
|
|
|
|
RUN apt-get update && apt-get install -y \ |
|
wget \ |
|
curl \ |
|
git \ |
|
cmake \ |
|
build-essential \ |
|
python3 \ |
|
python3-pip \ |
|
python-is-python3 \ |
|
ca-certificates \ |
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
|
|
|
|
|
|
|
|
RUN git clone --recursive https://github.com/microsoft/BitNet.git |
|
|
|
|
|
COPY . /BitNet |
|
|
|
WORKDIR /BitNet |
|
|
|
|
|
RUN pip install --upgrade pip && \ |
|
pip install -r requirements.txt |
|
|
|
|
|
RUN pip install huggingface_hub |
|
|
|
|
|
ARG HF_TOKEN |
|
RUN huggingface-cli login --token $HF_TOKEN || true |
|
|
|
|
|
RUN huggingface-cli download israellaguan/Falcon3-10B-Instruct-1.58bit-i2_s --local-dir models/ |
|
|
|
|
|
RUN python utils/codegen_tl1.py --model bitnet_b1_58-3B --BM 160,320,320 --BK 64,128,64 --bm 32,64,32 |
|
|
|
|
|
RUN mkdir -p build && cd build && cmake .. && make -j$(nproc) |
|
|
|
|
|
CMD ["python", "app.py"] |
|
|