ar08 commited on
Commit
fc73f28
·
verified ·
1 Parent(s): 861cb4a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -7
Dockerfile CHANGED
@@ -1,6 +1,5 @@
1
  FROM ubuntu:22.04
2
 
3
- # Set environment variables to avoid some prompts
4
  ENV DEBIAN_FRONTEND=noninteractive
5
 
6
  # Update & install system dependencies
@@ -17,9 +16,15 @@ RUN apt-get update && apt-get install -y \
17
  && rm -rf /var/lib/apt/lists/*
18
 
19
  # Install LLVM
20
- # Clone the BitNet repository
 
 
 
21
  RUN git clone --recursive https://github.com/microsoft/BitNet.git
22
 
 
 
 
23
  WORKDIR /BitNet
24
 
25
  # Install Python dependencies
@@ -29,17 +34,18 @@ RUN pip install --upgrade pip && \
29
  # Hugging Face CLI setup
30
  RUN pip install huggingface_hub
31
 
32
- # Optional: Pass HF_TOKEN as build-arg or mount config manually
33
- # If model requires authentication, make sure to set HF_TOKEN in build
34
  ARG HF_TOKEN
35
  RUN huggingface-cli login --token $HF_TOKEN || true
36
 
37
- # Download model into models/ folder
38
  RUN huggingface-cli download tiiuae/Falcon3-7B-Instruct-1.58bit-GGUF --local-dir models/
 
 
39
  RUN python utils/codegen_tl1.py --model bitnet_b1_58-3B --BM 160,320,320 --BK 64,128,64 --bm 32,64,32
40
 
41
- # Run cmake build process (assumes a CMakeLists.txt is in place)
42
  RUN mkdir -p build && cd build && cmake .. && make -j$(nproc)
43
 
44
- # Set default command
45
  CMD ["python", "app.py"]
 
1
  FROM ubuntu:22.04
2
 
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
 
5
  # Update & install system dependencies
 
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
 
25
+ # Copy everything from the local directory (where Dockerfile is) into the BitNet directory in the container
26
+ COPY . /BitNet
27
+
28
  WORKDIR /BitNet
29
 
30
  # Install Python dependencies
 
34
  # Hugging Face CLI setup
35
  RUN pip install huggingface_hub
36
 
37
+ # Optional: HF token
 
38
  ARG HF_TOKEN
39
  RUN huggingface-cli login --token $HF_TOKEN || true
40
 
41
+ # Download the model into ./models/
42
  RUN huggingface-cli download tiiuae/Falcon3-7B-Instruct-1.58bit-GGUF --local-dir models/
43
+
44
+ # Run BitNet preprocessing script
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
 
47
+ # Build the project
48
  RUN mkdir -p build && cd build && cmake .. && make -j$(nproc)
49
 
50
+ # Default command
51
  CMD ["python", "app.py"]