Yermek68 commited on
Commit
c7c513b
·
verified ·
1 Parent(s): f09104b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -3
Dockerfile CHANGED
@@ -1,8 +1,20 @@
 
1
  FROM python:3.10-slim
2
- RUN apt-get update && apt-get install -y git ffmpeg libsm6 libxext6
 
 
 
 
3
  WORKDIR /app
4
  COPY . /app
5
- RUN pip install --upgrade pip && pip install -r requirements.txt \
6
- && pip install "huggingface-hub==0.23.4" "transformers==4.46.0" "torch==2.4.1"
 
 
 
 
 
 
 
7
  EXPOSE 7860
8
  CMD ["python", "app.py"]
 
1
+ # 1️⃣ Используем чистый официальный Python образ
2
  FROM python:3.10-slim
3
+
4
+ # 2️⃣ Устанавливаем системные зависимости
5
+ RUN apt-get update && apt-get install -y git ffmpeg libsm6 libxext6 && rm -rf /var/lib/apt/lists/*
6
+
7
+ # 3️⃣ Рабочая директория
8
  WORKDIR /app
9
  COPY . /app
10
+
11
+ # 4️⃣ Чистим всё, что Hugging Face ставит по умолчанию
12
+ RUN pip install --no-cache-dir --upgrade pip \
13
+ && pip uninstall -y gradio gradio-client spaces huggingface-hub || true \
14
+ && pip install --no-cache-dir -r requirements.txt \
15
+ && pip install --no-cache-dir "huggingface-hub==0.23.4" "transformers==4.46.0" "torch==2.4.1" \
16
+ && pip check
17
+
18
+ # 5️⃣ Запуск
19
  EXPOSE 7860
20
  CMD ["python", "app.py"]