viarl199020 commited on
Commit
d83bfcf
Β·
verified Β·
1 Parent(s): f58b152

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -13
Dockerfile CHANGED
@@ -1,11 +1,7 @@
1
- # ═══════════════════════════════════════════════════════════════════════════════
2
- # Dockerfile β€” Cerebro H β€” RiskAuditor v3.0 (BitNet REAL β€” ik_llama.cpp)
3
- # Arquitectura: MATH(<2ms) + BitNet-2B-1.58bit (100%% inferencias) + FastAPI
4
- # Motor: ik_llama.cpp AVX512_VNNI_VBMI β€” compatible GGUF i2_s nativo
5
  # KellyContinuo+MonteCarlo+ZScorePanic
6
- # ═══════════════════════════════════════════════════════════════════════════════
7
 
8
- # ── Etapa 1: Descargar modelo BitNet 2B ──────────────────────────────────────
9
  FROM python:3.11-slim AS model-fetcher
10
 
11
  RUN apt-get update && apt-get install -y --no-install-recommends \
@@ -17,23 +13,21 @@ RUN pip install --no-cache-dir huggingface_hub
17
  COPY download_model.py /tmp/download_model.py
18
  RUN python3 /tmp/download_model.py
19
 
20
- # ── Etapa 2: Runtime ─────────────────────────────────────────────────────────
21
  FROM python:3.11-slim AS runtime
22
 
23
  RUN apt-get update && apt-get install -y --no-install-recommends \
24
  curl ca-certificates libgomp1 libstdc++6 unzip wget \
25
  && rm -rf /var/lib/apt/lists/*
26
 
27
- # ik_llama.cpp precompilado β€” soporte GGUF i2_s nativo (BitNet ternario)
28
- # AVX512_VNNI_VBMI: Γ³ptimo para Intel Xeon Platinum de HF Spaces
29
  RUN wget -q --user-agent="Mozilla/5.0" -O /tmp/ik.zip \
30
  "https://github.com/Thireus/ik_llama.cpp/releases/download/main-b4801-b275691/ik_llama-main-b4801-b275691-bin-ubuntu-x64-avx512_vnni_vbmi.zip" \
31
  && mkdir -p /app && unzip -q /tmp/ik.zip -d /app && rm /tmp/ik.zip \
32
  && BINARY=$(find /app -name "llama-server" -type f | head -1) \
33
  && ln -sf "$BINARY" /usr/local/bin/llama-server && chmod +x "$BINARY"
34
 
35
- ENV PATH="/app:${PATH}"
36
- ENV LD_LIBRARY_PATH="/app:${LD_LIBRARY_PATH}"
37
 
38
  WORKDIR /app
39
 
@@ -44,9 +38,8 @@ RUN pip install --no-cache-dir \
44
  "uvicorn[standard]==0.30.1" \
45
  httpx==0.27.0 \
46
  numpy==1.26.4 \
47
- scipy==1.13.0 \
48
 
49
- # Variables de entorno β€” compatibles con start.sh y server.py
50
  ENV MODEL_PATH="/models/ggml-model-i2_s.gguf"
51
  ENV N_CTX=2048
52
  ENV N_THREADS=2
 
1
+ # Dockerfile β€” Cerebro H β€” RiskAuditor v6.0 (BitNet REAL β€” ik_llama.cpp)
 
 
 
2
  # KellyContinuo+MonteCarlo+ZScorePanic
 
3
 
4
+ # ── Etapa 1: MODEL FETCHER ────────────────────────────────────────────────────
5
  FROM python:3.11-slim AS model-fetcher
6
 
7
  RUN apt-get update && apt-get install -y --no-install-recommends \
 
13
  COPY download_model.py /tmp/download_model.py
14
  RUN python3 /tmp/download_model.py
15
 
16
+ # ── Etapa 2: RUNTIME ──────────────────────────────────────────────────────────
17
  FROM python:3.11-slim AS runtime
18
 
19
  RUN apt-get update && apt-get install -y --no-install-recommends \
20
  curl ca-certificates libgomp1 libstdc++6 unzip wget \
21
  && rm -rf /var/lib/apt/lists/*
22
 
 
 
23
  RUN wget -q --user-agent="Mozilla/5.0" -O /tmp/ik.zip \
24
  "https://github.com/Thireus/ik_llama.cpp/releases/download/main-b4801-b275691/ik_llama-main-b4801-b275691-bin-ubuntu-x64-avx512_vnni_vbmi.zip" \
25
  && mkdir -p /app && unzip -q /tmp/ik.zip -d /app && rm /tmp/ik.zip \
26
  && BINARY=$(find /app -name "llama-server" -type f | head -1) \
27
  && ln -sf "$BINARY" /usr/local/bin/llama-server && chmod +x "$BINARY"
28
 
29
+ ENV PATH="/app:$PATH"
30
+ ENV LD_LIBRARY_PATH="/app:$LD_LIBRARY_PATH"
31
 
32
  WORKDIR /app
33
 
 
38
  "uvicorn[standard]==0.30.1" \
39
  httpx==0.27.0 \
40
  numpy==1.26.4 \
41
+ scipy==1.13.0
42
 
 
43
  ENV MODEL_PATH="/models/ggml-model-i2_s.gguf"
44
  ENV N_CTX=2048
45
  ENV N_THREADS=2