forked from quantori/pyforge-python-school-3
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (21 loc) · 889 Bytes
/
Dockerfile
File metadata and controls
28 lines (21 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Используем официальный образ Python
FROM python:3.11-slim
# Устанавливаем рабочую директорию
WORKDIR /app
# Устанавливаем системные зависимости, включая X11 библиотеки для RDKit
RUN apt-get update && apt-get install -y \
libxrender1 \
libxext6 \
libsm6 \
libfreetype6 \
&& rm -rf /var/lib/apt/lists/*
# Копируем зависимости
COPY requirements.txt .
# Устанавливаем зависимости Python
RUN pip install --no-cache-dir -r requirements.txt
# Копируем весь код в /app/src
COPY ./src /app/src
# Устанавливаем рабочую директорию в /app/src
WORKDIR /app/src
# Запускаем приложение
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]