FROM python:3.9-slim WORKDIR /app # Устанавливаем системные зависимости RUN apt-get update && apt-get install -y \ gcc \ g++ \ make \ build-essential \ && rm -rf /var/lib/apt/lists/* # Устанавливаем pip и setuptools RUN pip install --no-cache-dir --upgrade pip # Сначала устанавливаем setuptools и wheel RUN pip install --no-cache-dir setuptools wheel # Копируем requirements.txt и устанавливаем остальное COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Копируем приложение COPY . . RUN mkdir -p model EXPOSE 7860 CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]