GrechnikNet / Dockerfile
Paradise151's picture
Update Dockerfile
9eb6d30 verified
raw
history blame contribute delete
682 Bytes
# 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"]