VladGeekPro commited on
Commit
cdef530
·
1 Parent(s): 395946e

fixedLibss1.1

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -29
Dockerfile CHANGED
@@ -1,43 +1,26 @@
1
- # Stage 1: Копируем Duckling из официального образа
2
  FROM rasa/duckling:latest AS duckling
3
-
4
- # Stage 2: Основной образ
5
  FROM python:3.11-slim
6
 
7
- ENV PYTHONUNBUFFERED=1 \
8
- PIP_NO_CACHE_DIR=1 \
9
- HOME=/home/user \
10
- PATH=/home/user/.local/bin:$PATH \
11
- PORT=7860 \
12
- WHISPER_MODEL=large-v3 \
13
- WHISPER_COMPUTE_TYPE=int8 \
14
  DUCKLING_URL=http://localhost:8000/parse
15
 
16
- # Установка зависимостей: ffmpeg, supervisor, и библиотеки для Duckling
17
- RUN apt-get update && apt-get install -y --no-install-recommends \
18
- ffmpeg \
19
- supervisor \
20
- libgmp10 \
21
- libpcre2-8-0 \
22
- && rm -rf /var/lib/apt/lists/*
23
-
24
- # Копируем бинарник Duckling и делаем его исполняемым
25
- COPY --from=duckling /usr/local/bin/duckling-example-exe /usr/local/bin/duckling-example-exe
26
- RUN chmod +x /usr/local/bin/duckling-example-exe
27
 
28
- RUN useradd -m -u 1000 user
29
 
30
  USER user
31
- WORKDIR $HOME/app
32
 
33
- COPY --chown=user requirements.txt ./requirements.txt
34
  RUN pip install --upgrade pip && pip install -r requirements.txt
35
 
36
- COPY --chown=user app.py ./app.py
37
- COPY --chown=user duckling_client.py ./duckling_client.py
38
- COPY --chown=user supervisord.conf ./supervisord.conf
39
 
40
  EXPOSE 7860
41
-
42
- # Запуск через supervisor (Duckling + Gunicorn)
43
  CMD ["supervisord", "-c", "supervisord.conf"]
 
 
1
  FROM rasa/duckling:latest AS duckling
 
 
2
  FROM python:3.11-slim
3
 
4
+ ENV PYTHONUNBUFFERED=1 PIP_NO_CACHE_DIR=1 HOME=/home/user \
5
+ PATH=/home/user/.local/bin:$PATH PORT=7860 \
6
+ WHISPER_MODEL=large-v3 WHISPER_COMPUTE_TYPE=int8 \
 
 
 
 
7
  DUCKLING_URL=http://localhost:8000/parse
8
 
9
+ RUN echo "deb http://deb.debian.org/debian bullseye main" > /etc/apt/sources.list.d/bullseye.list \
10
+ && apt-get update && apt-get install -y --no-install-recommends \
11
+ ffmpeg supervisor libgmp10 libpcre2-8-0 libssl1.1 \
12
+ && rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/bullseye.list \
13
+ && useradd -m -u 1000 user
 
 
 
 
 
 
14
 
15
+ COPY --from=duckling /usr/local/bin/duckling-example-exe /usr/local/bin/
16
 
17
  USER user
18
+ WORKDIR /home/user/app
19
 
20
+ COPY --chown=user requirements.txt .
21
  RUN pip install --upgrade pip && pip install -r requirements.txt
22
 
23
+ COPY --chown=user app.py duckling_client.py supervisord.conf ./
 
 
24
 
25
  EXPOSE 7860
 
 
26
  CMD ["supervisord", "-c", "supervisord.conf"]