File size: 682 Bytes
9eb6d30
2269cdd
 
9eb6d30
2269cdd
 
9eb6d30
 
 
 
 
 
 
2269cdd
 
9eb6d30
2269cdd
 
9eb6d30
2269cdd
 
9eb6d30
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# 1. Базовый образ
FROM python:3.9-slim

# 2. Рабочая директория
WORKDIR /code

# 3. Устанавливаем системные зависимости для OpenCV
RUN apt-get update && apt-get install -y \
    libgl1 \
    libglib2.0-0 \
 && rm -rf /var/lib/apt/lists/*

# 4. Копируем requirements.txt
COPY ./requirements.txt /code/requirements.txt

# 5. Устанавливаем Python-зависимости
RUN pip install --no-cache-dir --upgrade pip -r /code/requirements.txt

# 6. Копируем проект
COPY ./ /code/

# 7. Запуск приложения
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]