Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +8 -11
Dockerfile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
FROM
|
| 2 |
|
| 3 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 4 |
|
|
@@ -11,14 +11,11 @@ RUN apt-get update && apt-get install -y \
|
|
| 11 |
build-essential \
|
| 12 |
python3 \
|
| 13 |
python3-pip \
|
|
|
|
| 14 |
python-is-python3 \
|
| 15 |
ca-certificates \
|
| 16 |
&& rm -rf /var/lib/apt/lists/*
|
| 17 |
|
| 18 |
-
# Install LLVM
|
| 19 |
-
# NOTE: Uncomment this if you actually want to install LLVM.
|
| 20 |
-
# RUN bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
|
| 21 |
-
|
| 22 |
# Clone BitNet
|
| 23 |
RUN git clone --recursive https://github.com/microsoft/BitNet.git
|
| 24 |
|
|
@@ -29,7 +26,7 @@ WORKDIR /BitNet
|
|
| 29 |
|
| 30 |
# Install Python dependencies
|
| 31 |
RUN pip install --upgrade pip && \
|
| 32 |
-
pip install -r requirements.txt
|
| 33 |
|
| 34 |
# Hugging Face CLI setup
|
| 35 |
RUN pip install huggingface_hub
|
|
@@ -38,11 +35,11 @@ RUN pip install huggingface_hub
|
|
| 38 |
ARG HF_TOKEN
|
| 39 |
RUN huggingface-cli login --token $HF_TOKEN || true
|
| 40 |
|
| 41 |
-
|
| 42 |
-
RUN
|
| 43 |
|
| 44 |
-
#
|
| 45 |
-
RUN python utils/codegen_tl1.py --model bitnet_b1_58-3B --BM 160,320,320 --BK 64,128,64 --bm 32,64,32
|
| 46 |
RUN mkdir -p build && cd build && cmake .. && make -j$(nproc)
|
| 47 |
|
| 48 |
-
|
|
|
|
|
|
| 1 |
+
FROM debian:12-slim
|
| 2 |
|
| 3 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 4 |
|
|
|
|
| 11 |
build-essential \
|
| 12 |
python3 \
|
| 13 |
python3-pip \
|
| 14 |
+
python3-venv \
|
| 15 |
python-is-python3 \
|
| 16 |
ca-certificates \
|
| 17 |
&& rm -rf /var/lib/apt/lists/*
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
# Clone BitNet
|
| 20 |
RUN git clone --recursive https://github.com/microsoft/BitNet.git
|
| 21 |
|
|
|
|
| 26 |
|
| 27 |
# Install Python dependencies
|
| 28 |
RUN pip install --upgrade pip && \
|
| 29 |
+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
| 30 |
|
| 31 |
# Hugging Face CLI setup
|
| 32 |
RUN pip install huggingface_hub
|
|
|
|
| 35 |
ARG HF_TOKEN
|
| 36 |
RUN huggingface-cli login --token $HF_TOKEN || true
|
| 37 |
|
| 38 |
+
RUN huggingface-cli download HF1BitLLM/Llama3-8B-1.58-100B-tokens --local-dir models/Llama3-8B-1.58-100B-tokens
|
| 39 |
+
RUN python setup_env.py -md models/Llama3-8B-1.58-100B-tokens -q i2_s
|
| 40 |
|
| 41 |
+
# Build C++ runtime
|
|
|
|
| 42 |
RUN mkdir -p build && cd build && cmake .. && make -j$(nproc)
|
| 43 |
|
| 44 |
+
# Default command
|
| 45 |
+
CMD ["python3", "app.py"]
|