Yermek68 commited on
Commit
3da7baa
·
verified ·
1 Parent(s): 20349e5

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -12
Dockerfile CHANGED
@@ -1,11 +1,10 @@
1
  # ================================
2
  # ✅ Hugging Face Space Dockerfile — Eroha Summarizer PRO
3
- # Версия: 3.9 (Silent Runtime, Stable MBART/mT5)
4
  # ================================
5
 
6
  FROM python:3.10-slim
7
 
8
- # --- ENV ---
9
  ENV DEBIAN_FRONTEND=noninteractive \
10
  PYTHONUNBUFFERED=1 \
11
  PYTHONIOENCODING=utf8 \
@@ -14,18 +13,17 @@ ENV DEBIAN_FRONTEND=noninteractive \
14
  HF_HUB_DISABLE_SYMLINKS_WARNING=1 \
15
  GRADIO_ANALYTICS_ENABLED=False \
16
  GRADIO_SERVER_PORT=7860 \
17
- GRADIO_SERVER_NAME=0.0.0.0
 
18
 
19
- # --- Системные библиотеки ---
20
  RUN apt-get update && apt-get install -y \
21
  git git-lfs ffmpeg curl wget libgl1 libmagic1 fonts-dejavu-core \
22
- cmake build-essential libprotobuf-dev protobuf-compiler \
23
  && git lfs install && rm -rf /var/lib/apt/lists/*
24
 
25
  WORKDIR /app
26
  RUN mkdir -p /home/user/.cache/huggingface && chmod -R 777 /home/user
27
 
28
- # --- Зависимости ---
29
  COPY requirements.txt /app/
30
  RUN pip install --no-cache-dir -U pip setuptools wheel && \
31
  pip install --no-cache-dir -r /app/requirements.txt && \
@@ -42,14 +40,11 @@ def _patched_close(self):\n\
42
  except Exception:\n\
43
  pass\n\
44
  asyncio.SelectorEventLoop._close_self_pipe = _patched_close\n\
45
- warnings.filterwarnings('ignore', category=ResourceWarning)\n\
46
- warnings.filterwarnings('ignore', category=UserWarning)\n\
47
- print('✅ Asyncio patch loaded — all warnings muted')\n\
48
  " > /usr/local/lib/python3.10/site-packages/_asyncio_patch.py
49
 
50
- # --- Очистка ---
51
- RUN apt-get clean && rm -rf /root/.cache
52
-
53
  EXPOSE 7860
54
  COPY app.py /app/
55
  CMD ["bash", "-c", "python -W ignore -m _asyncio_patch && python app.py"]
 
 
1
  # ================================
2
  # ✅ Hugging Face Space Dockerfile — Eroha Summarizer PRO
3
+ # Версия: 4.0 (Enterprise Optimized Runtime)
4
  # ================================
5
 
6
  FROM python:3.10-slim
7
 
 
8
  ENV DEBIAN_FRONTEND=noninteractive \
9
  PYTHONUNBUFFERED=1 \
10
  PYTHONIOENCODING=utf8 \
 
13
  HF_HUB_DISABLE_SYMLINKS_WARNING=1 \
14
  GRADIO_ANALYTICS_ENABLED=False \
15
  GRADIO_SERVER_PORT=7860 \
16
+ GRADIO_SERVER_NAME=0.0.0.0 \
17
+ PYTHONWARNINGS=ignore
18
 
 
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
  RUN mkdir -p /home/user/.cache/huggingface && chmod -R 777 /home/user
26
 
 
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 && \
 
40
  except Exception:\n\
41
  pass\n\
42
  asyncio.SelectorEventLoop._close_self_pipe = _patched_close\n\
43
+ warnings.filterwarnings('ignore')\n\
44
+ print('✅ Asyncio patch & warnings muted')\n\
 
45
  " > /usr/local/lib/python3.10/site-packages/_asyncio_patch.py
46
 
 
 
 
47
  EXPOSE 7860
48
  COPY app.py /app/
49
  CMD ["bash", "-c", "python -W ignore -m _asyncio_patch && python app.py"]
50
+