AAJerry commited on
Commit
a9e2a9b
·
verified ·
1 Parent(s): 2e3e276

Add Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +31 -0
Dockerfile ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime
2
+
3
+ ENV DEBIAN_FRONTEND=noninteractive \
4
+ PYTHONUNBUFFERED=1 \
5
+ PYTHONDONTWRITEBYTECODE=1 \
6
+ PERSIST_ROOT=/app/data \
7
+ HF_HOME=/app/data/cache/huggingface \
8
+ TRANSFORMERS_CACHE=/app/data/cache/huggingface \
9
+ HF_HUB_ENABLE_HF_TRANSFER=1 \
10
+ TOKENIZERS_PARALLELISM=false \
11
+ PORT=7860
12
+
13
+ RUN apt-get update && apt-get install -y --no-install-recommends \
14
+ build-essential ca-certificates cmake curl git wget && \
15
+ rm -rf /var/lib/apt/lists/*
16
+
17
+ WORKDIR /app
18
+ COPY requirements.txt .
19
+ RUN python -m pip install --no-cache-dir --upgrade pip && \
20
+ python -m pip install --no-cache-dir -r requirements.txt
21
+
22
+ # Pinned official llama.cpp revision for reproducible GGUF conversion.
23
+ RUN git clone https://github.com/ggml-org/llama.cpp.git /opt/llama.cpp && \
24
+ cd /opt/llama.cpp && \
25
+ git checkout 4762ad7316dcdec20016ab5985fb46a27902204d && \
26
+ cmake -B build -DGGML_CUDA=OFF -DLLAMA_CURL=OFF -DCMAKE_BUILD_TYPE=Release && \
27
+ cmake --build build --config Release -j2 --target llama-quantize
28
+
29
+ COPY . /app
30
+ EXPOSE 7860
31
+ CMD ["python", "app.py"]