Jake Reardon commited on
Commit
b99deae
·
1 Parent(s): 4fbdd2c

Fix installation order for SAM 3D Body

Browse files

- Install PyTorch first, which is required by Detectron2
- Move installation of Detectron2, MoGe, and SAM 3D Body to Dockerfile
- Ensure proper installation order following official guide

Files changed (2) hide show
  1. Dockerfile +7 -4
  2. requirements.txt +2 -6
Dockerfile CHANGED
@@ -13,16 +13,19 @@ RUN apt-get update && apt-get install -y \
13
  # Copy requirements file
14
  COPY requirements.txt .
15
 
16
- # Install Python dependencies
 
 
 
17
  RUN pip install --no-cache-dir -r requirements.txt
18
 
19
- # Install Detectron2
20
  RUN pip install --no-cache-dir 'git+https://github.com/facebookresearch/detectron2.git@a1ce2f9' --no-build-isolation --no-deps
21
 
22
- # Optional: Install MoGe
23
  RUN pip install --no-cache-dir git+https://github.com/microsoft/MoGe.git
24
 
25
- # Install SAM 3D Body from source
26
  RUN git clone https://github.com/facebookresearch/sam-3d-body.git /app/sam-3d-body && \
27
  cd /app/sam-3d-body && \
28
  pip install -e .
 
13
  # Copy requirements file
14
  COPY requirements.txt .
15
 
16
+ # 1. Install PyTorch first (required by Detectron2)
17
+ RUN pip install --no-cache-dir torch==2.1.1 torchvision==0.16.1
18
+
19
+ # 2. Install Python dependencies from requirements.txt
20
  RUN pip install --no-cache-dir -r requirements.txt
21
 
22
+ # 3. Install Detectron2 (after PyTorch is installed)
23
  RUN pip install --no-cache-dir 'git+https://github.com/facebookresearch/detectron2.git@a1ce2f9' --no-build-isolation --no-deps
24
 
25
+ # 4. Install MoGe
26
  RUN pip install --no-cache-dir git+https://github.com/microsoft/MoGe.git
27
 
28
+ # 5. Install SAM 3D Body from source
29
  RUN git clone https://github.com/facebookresearch/sam-3d-body.git /app/sam-3d-body && \
30
  cd /app/sam-3d-body && \
31
  pip install -e .
requirements.txt CHANGED
@@ -40,12 +40,8 @@ optree==0.10.0
40
  fvcore==0.1.5.post20221221
41
  huggingface_hub==0.20.2
42
 
43
- # SAM 3D Body dependencies - based on official installation guide
44
- # Install Detectron2 (required by SAM 3D Body)
45
- git+https://github.com/facebookresearch/detectron2.git@a1ce2f9
46
-
47
- # Install MoGe (optional but recommended for SAM 3D Body)
48
- git+https://github.com/microsoft/MoGe.git
49
 
50
  # 3D model processing
51
  trimesh==4.0.5
 
40
  fvcore==0.1.5.post20221221
41
  huggingface_hub==0.20.2
42
 
43
+ # SAM 3D Body dependencies - these are installed directly in Dockerfile
44
+ # in the correct order: PyTorch -> requirements -> Detectron2 -> MoGe -> SAM 3D Body
 
 
 
 
45
 
46
  # 3D model processing
47
  trimesh==4.0.5