develop - hack_2026

This commit is contained in:
denis 2026-09-23 01:37:36 +03:00
parent a2c1b8a6b5
commit c234193eb4
1 changed files with 44 additions and 8 deletions

View File

@ -1,13 +1,18 @@
# DXA Quality Assessment - Docker Container # DXA Quality Assessment - Docker Container (GPU / CUDA)
# Build: docker build -t dxa-quality . # Build: docker build -t dxa-quality .
# Run: docker run -v /path/to/data:/data -p 8000:8000 dxa-quality # Run: docker run --gpus all -v /path/to/data:/data -p 8000:8000 dxa-quality
# Base image with GPU support # Base image with GPU support
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04 AS builder FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04
# Неинтерактивный режим для apt
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
python3.10 \ python3.10 \
python3-pip \ python3-pip \
python3.10-dev \
python3.10-venv \
build-essential \ build-essential \
ninja-build \ ninja-build \
libgl1-mesa-glx \ libgl1-mesa-glx \
@ -18,13 +23,44 @@ RUN apt-get update && apt-get install -y \
libgomp1 \ libgomp1 \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# Установить свежий meson через pip (0.64.0+) # Обновляем pip и ставим свежий meson (0.64.0+) — ДО всех Python-пакетов
RUN pip3 install --no-cache-dir "meson>=0.64.0" RUN pip3 install --no-cache-dir --upgrade pip "meson>=0.64.0"
WORKDIR /app WORKDIR /app
COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt
# --- PyTorch под CUDA 11.8 (ставим отдельно, чтобы не тянулся CUDA 12.6) ---
RUN pip3 install --no-cache-dir \
torch==2.8.0 torchvision==0.23.0 \
--index-url https://download.pytorch.org/whl/cu118
# --- Остальные зависимости ---
# Ставим с явными ограничениями, чтобы pip разрешил конфликты
RUN pip3 install --no-cache-dir \
fastapi==0.128.8 \
"uvicorn[standard]==0.39.0" \
monai==1.5.2 \
TotalSegmentator==2.18.0 \
nibabel==5.3.3 \
pydicom==2.4.4 \
pydicom-seg==0.4.1 \
opencv-python-headless==4.11.0.86 \
scikit-learn==1.6.1 \
scipy==1.13.1 \
pandas==2.3.3 \
numpy==1.26.4 \
openpyxl==3.1.5 \
matplotlib==3.9.4 \
timm==1.0.29 \
python-multipart==0.0.20 \
pydantic==2.13.4 \
typer==0.23.2 \
click==8.2.1 \
huggingface_hub==1.8.0 \
safetensors==0.7.0 \
simpleitk==2.5.6 \
tqdm==4.70.0 \
rich==15.0.0 \
PyYAML==6.0.3
# Copy application code # Copy application code
COPY . . COPY . .