Yermek68 commited on
Commit
dc4275d
·
verified ·
1 Parent(s): 331b7d5

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -9
Dockerfile CHANGED
@@ -1,9 +1,8 @@
1
  # ================================
2
- # ✅ Eroha Summarizer PRO v4.5 — Enterprise Build
3
  # ================================
4
  FROM python:3.10-slim
5
 
6
- # --- Environment ---
7
  ENV DEBIAN_FRONTEND=noninteractive \
8
  PYTHONUNBUFFERED=1 \
9
  PYTHONIOENCODING=utf8 \
@@ -15,7 +14,7 @@ ENV DEBIAN_FRONTEND=noninteractive \
15
  GRADIO_SERVER_NAME=0.0.0.0 \
16
  PYTHONWARNINGS=ignore
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 \
@@ -24,20 +23,20 @@ RUN apt-get update && apt-get install -y \
24
  WORKDIR /app
25
  RUN mkdir -p /home/user/.cache/huggingface && chmod -R 777 /home/user
26
 
27
- # --- Python deps ---
28
  COPY requirements.txt /app/
29
  RUN pip install --no-cache-dir -U pip setuptools wheel && \
30
  pip install --no-cache-dir -r /app/requirements.txt && \
31
- pip install --no-cache-dir tokenizers==0.19.1 sentencepiece==0.2.0 && \
32
  pip cache purge
33
 
34
- # --- Compile SentencePiece manually (native C++) ---
35
  RUN git clone https://github.com/google/sentencepiece.git /tmp/sentencepiece && \
36
  cd /tmp/sentencepiece && mkdir build && cd build && \
37
  cmake .. && make -j $(nproc) && make install && ldconfig && \
38
  cd / && rm -rf /tmp/sentencepiece
39
 
40
- # --- Asyncio patch & warnings suppression ---
41
  RUN echo "\
42
  import warnings, asyncio\n\
43
  def _patched_close(self):\n\
@@ -52,6 +51,4 @@ print('✅ Asyncio patch & warnings muted')\n\
52
 
53
  EXPOSE 7860
54
  COPY app.py /app/
55
-
56
- # --- Run ---
57
  CMD ["bash", "-c", "python -W ignore -m _asyncio_patch && python app.py"]
 
1
  # ================================
2
+ # ✅ Eroha Summarizer PRO v4.5 — Stable Hugging Face Build
3
  # ================================
4
  FROM python:3.10-slim
5
 
 
6
  ENV DEBIAN_FRONTEND=noninteractive \
7
  PYTHONUNBUFFERED=1 \
8
  PYTHONIOENCODING=utf8 \
 
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 \
 
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 "\
41
  import warnings, asyncio\n\
42
  def _patched_close(self):\n\
 
51
 
52
  EXPOSE 7860
53
  COPY app.py /app/
 
 
54
  CMD ["bash", "-c", "python -W ignore -m _asyncio_patch && python app.py"]