floorplan-detection / Dockerfile
intisarhasnain's picture
replace gradio with fastapi+html, clean Dockerfile
037fe03
raw
history blame contribute delete
952 Bytes
FROM python:3.10-slim
RUN apt-get update && apt-get install -y \
git git-lfs libgl1 libglib2.0-0 libsm6 libxext6 libxrender-dev ffmpeg \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY . .
# PyTorch CPU
RUN pip install --no-cache-dir \
"torch==2.1.2+cpu" "torchvision==0.16.2+cpu" \
--extra-index-url https://download.pytorch.org/whl/cpu
# MMDet 3.x stack
RUN pip install --no-cache-dir openmim && \
mim install "mmengine>=0.7.1,<1.0.0" && \
mim install "mmcv>=2.0.0rc4,<2.2.0"
# MMDetection from local submodule
RUN pip install --no-cache-dir -e ./mmdetection
# App deps — no Gradio, no huggingface_hub conflicts
RUN pip install --no-cache-dir \
fastapi==0.110.0 \
uvicorn==0.29.0 \
python-multipart==0.0.9 \
opencv-python-headless \
pillow \
"numpy>=1.23.0,<2.0"
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user PATH=/home/user/.local/bin:$PATH
EXPOSE 7860
CMD ["python", "app.py"]