develop - hack_2026

This commit is contained in:
denis 2026-09-23 01:07:46 +03:00
parent 29543ebdca
commit 4a8c022475
2 changed files with 49 additions and 15 deletions

View File

@ -1,40 +1,33 @@
# DXA Quality Assessment - Docker Container
# DXA Quality Assessment - Docker Container (CPU only)
# Build: docker build -t dxa-quality .
# Run: docker run -v /path/to/data:/data -p 8000:8000 dxa-quality
# Base image with GPU support
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04 AS builder
FROM python:3.10-slim AS builder
# Install Python and build tools
RUN apt-get update && apt-get install -y \
python3.10 \
python3-pip \
build-essential \
meson \
ninja-build \
libgl1-mesa-glx \
libgl1 \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender1 \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install --no-cache-dir "meson>=0.64.0"
WORKDIR /app
# Copy requirements and install Python dependencies
COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt
RUN pip3 install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
RUN mkdir -p models
# Expose API port
EXPOSE 8000
# Environment variables
ENV PYTHONUNBUFFERED=1
ENV PYTHONPATH=/app
# Default command
CMD ["python3", "-m", "uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8000"]
CMD ["python3", "-m", "uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8000"]

41
Dockerfile_cuda Normal file
View File

@ -0,0 +1,41 @@
# DXA Quality Assessment - Docker Container
# Build: docker build -t dxa-quality .
# Run: docker run -v /path/to/data:/data -p 8000:8000 dxa-quality
# Base image with GPU support
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04 AS builder
RUN apt-get update && apt-get install -y \
python3.10 \
python3-pip \
build-essential \
ninja-build \
libgl1-mesa-glx \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender1 \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*
# Установить свежий meson через pip (0.64.0+)
RUN pip3 install --no-cache-dir "meson>=0.64.0"
WORKDIR /app
COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
RUN mkdir -p models
# Expose API port
EXPOSE 8000
# Environment variables
ENV PYTHONUNBUFFERED=1
ENV PYTHONPATH=/app
# Default command
CMD ["python3", "-m", "uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8000"]