[AI]
MVP готов
This commit is contained in:
28
Dockerfile
Normal file
28
Dockerfile
Normal file
@@ -0,0 +1,28 @@
|
||||
FROM python:3.11-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Копируем pyproject.toml, чтобы получить версию
|
||||
COPY pyproject.toml .
|
||||
|
||||
# Устанавливаем toml, чтобы получить версию
|
||||
RUN pip install toml
|
||||
RUN python -c "import toml; print('VERSION=' + toml.load('pyproject.toml')['project']['version'])" > version.txt
|
||||
RUN echo "VERSION=$(cat version.txt | cut -d= -f2)" >> /etc/environment
|
||||
|
||||
# Установка зависимостей
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Копируем исходники
|
||||
COPY src/ ./src/
|
||||
COPY resources/ ./resources/
|
||||
|
||||
# Папки для входных и выходных данных
|
||||
VOLUME ["/app/inputs", "/app/outputs"]
|
||||
|
||||
# Точка входа
|
||||
ENTRYPOINT ["python", "-m", "src"]
|
||||
|
||||
# Пример запуска:
|
||||
# docker run -v ./my_inputs:/app/inputs -v ./my_outputs:/app/outputs md2docx --input inputs --output outputs
|
||||
Reference in New Issue
Block a user