Files
Denys Zaitsev d7e1066c60 Initial commit
2026-04-03 23:25:54 +03:00

40 lines
952 B
Docker

FROM python:3.10-slim
# Prevent Python from writing .pyc files and enable unbuffered logging
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
WORKDIR /app
# Install system dependencies required for OpenCV, Faiss, and git for LightGlue
RUN apt-get update && apt-get install -y --no-install-recommends \
libgl1 \
libglib2.0-0 \
git \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Install PyTorch with CUDA 11.8 support
RUN pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cu118
# Install Python dependencies
RUN pip install --no-cache-dir \
fastapi \
uvicorn[standard] \
pydantic \
numpy \
opencv-python-headless \
faiss-gpu \
gtsam \
sse-starlette \
sqlalchemy \
requests \
psutil \
scipy \
git+https://github.com/cvg/LightGlue.git
COPY . /app/
EXPOSE 8000
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]