# Use a base Python image FROM python:3.10 # Set working directory WORKDIR /home/user/app # Install system dependencies RUN apt-get update && apt-get install -y \ git \ git-lfs \ ffmpeg \ libsm6 \ libxext6 \ cmake \ rsync \ libgl1-mesa-glx \ && rm -rf /var/lib/apt/lists/* \ && git lfs install # Install pip RUN pip install --no-cache-dir pip==22.3.1 # Install PyTorch RUN pip install --no-cache-dir torch torchvision # Install detectron2 directly from GitHub RUN pip install --no-cache-dir \ git+https://github.com/facebookresearch/detectron2.git # Install other dependencies RUN pip install --no-cache-dir \ numpy \ opencv-python \ Pillow \ datasets \ huggingface-hub \ pyyaml \ tqdm # Copy your application code (if any) to the container COPY . /home/user/app # Set the entry point for the container (adjust if needed) CMD ["python", "app.py"]