Yermek68 commited on
Commit
e9436d4
·
verified ·
1 Parent(s): 793e29c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -11
Dockerfile CHANGED
@@ -1,6 +1,6 @@
1
- # ================================
2
- # Eroha Summarizer PRO v4.6 — Stable Hugging Face Build
3
- # ================================
4
  FROM python:3.10-slim
5
 
6
  ENV DEBIAN_FRONTEND=noninteractive \
@@ -12,29 +12,31 @@ ENV DEBIAN_FRONTEND=noninteractive \
12
  GRADIO_ANALYTICS_ENABLED=False \
13
  GRADIO_SERVER_PORT=7860 \
14
  GRADIO_SERVER_NAME=0.0.0.0 \
15
- PYTHONWARNINGS=ignore
 
16
 
17
- # --- Системные библиотеки ---
18
  RUN apt-get update && apt-get install -y \
19
  git git-lfs ffmpeg curl wget libgl1 libmagic1 fonts-dejavu-core \
20
  cmake build-essential libprotobuf-dev protobuf-compiler libsentencepiece-dev \
21
  && git lfs install && rm -rf /var/lib/apt/lists/*
22
 
23
  WORKDIR /app
24
- RUN mkdir -p /home/user/.cache/huggingface && chmod -R 777 /home/user
25
 
26
- # --- Python зависимости ---
27
  COPY requirements.txt /app/
28
- RUN pip install --no-cache-dir -U pip setuptools wheel && \
 
 
29
  pip install --no-cache-dir -r /app/requirements.txt && \
30
  pip install --no-cache-dir tokenizers==0.19.1 && \
31
  pip cache purge
32
 
33
- # --- Компиляция SentencePiece ---
34
- RUN git clone https://github.com/google/sentencepiece.git /tmp/sentencepiece && \
35
  cd /tmp/sentencepiece && mkdir build && cd build && \
36
  cmake .. && make -j $(nproc) && make install && ldconfig && \
37
- cd / && rm -rf /tmp/sentencepiece
38
 
39
  # --- Asyncio patch ---
40
  RUN echo "\
 
1
+ # =========================================
2
+ # 🚀 Eroha Summarizer PRO v5.1 — Stable Build (Gradio 5 + Pydantic 2)
3
+ # =========================================
4
  FROM python:3.10-slim
5
 
6
  ENV DEBIAN_FRONTEND=noninteractive \
 
12
  GRADIO_ANALYTICS_ENABLED=False \
13
  GRADIO_SERVER_PORT=7860 \
14
  GRADIO_SERVER_NAME=0.0.0.0 \
15
+ PYTHONWARNINGS=ignore \
16
+ PIP_NO_CACHE_DIR=1
17
 
18
+ # --- System dependencies ---
19
  RUN apt-get update && apt-get install -y \
20
  git git-lfs ffmpeg curl wget libgl1 libmagic1 fonts-dejavu-core \
21
  cmake build-essential libprotobuf-dev protobuf-compiler libsentencepiece-dev \
22
  && git lfs install && rm -rf /var/lib/apt/lists/*
23
 
24
  WORKDIR /app
 
25
 
26
+ # --- Copy dependencies ---
27
  COPY requirements.txt /app/
28
+
29
+ # --- Upgrade pip and install deps ---
30
+ RUN pip install -U pip setuptools wheel && \
31
  pip install --no-cache-dir -r /app/requirements.txt && \
32
  pip install --no-cache-dir tokenizers==0.19.1 && \
33
  pip cache purge
34
 
35
+ # --- Build SentencePiece manually ---
36
+ RUN git clone --depth=1 https://github.com/google/sentencepiece.git /tmp/sentencepiece && \
37
  cd /tmp/sentencepiece && mkdir build && cd build && \
38
  cmake .. && make -j $(nproc) && make install && ldconfig && \
39
+ rm -rf /tmp/sentencepiece
40
 
41
  # --- Asyncio patch ---
42
  RUN echo "\