File size: 1,159 Bytes
3ff2c8a | 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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | # InteriorFusion Docker Image
FROM nvidia/cuda:12.1-devel-ubuntu22.04
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Install system dependencies
RUN apt-get update && apt-get install -y \
python3.11 python3.11-dev python3.11-venv \
python3-pip \
git \
wget \
libgl1-mesa-glx \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
libgomp1 \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Set Python 3.11 as default
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.11 1
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1
# Upgrade pip
RUN python -m pip install --upgrade pip setuptools wheel
# Set working directory
WORKDIR /app
# Copy requirements first for layer caching
COPY pyproject.toml .
RUN pip install -e ".[dev,gs]"
# Copy source code
COPY . .
# Pre-download models (optional, speeds up first run)
# RUN python -c "from interiorfusion.pipelines import InteriorFusionPipeline; InteriorFusionPipeline()"
# Expose ports
EXPOSE 8000 7860
# Default command
CMD ["python", "-m", "interiorfusion.api.main"]
|