Spaces:
Running
Running
Jake Reardon
commited on
Commit
·
89f170b
1
Parent(s):
b99deae
Fix SAM 3D Body import method
Browse files- Update Dockerfile to clone repository without pip install
- Update sam_3d_service.py to add repository to Python path
- SAM 3D Body is not a standard Python package
- Dockerfile +2 -4
- app/sam_3d_service.py +3 -0
Dockerfile
CHANGED
|
@@ -25,10 +25,8 @@ RUN pip install --no-cache-dir 'git+https://github.com/facebookresearch/detectro
|
|
| 25 |
# 4. Install MoGe
|
| 26 |
RUN pip install --no-cache-dir git+https://github.com/microsoft/MoGe.git
|
| 27 |
|
| 28 |
-
# 5.
|
| 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 .
|
| 32 |
|
| 33 |
# Copy application code
|
| 34 |
COPY app/ ./app/
|
|
|
|
| 25 |
# 4. Install MoGe
|
| 26 |
RUN pip install --no-cache-dir git+https://github.com/microsoft/MoGe.git
|
| 27 |
|
| 28 |
+
# 5. Clone SAM 3D Body repository (not a standard Python package)
|
| 29 |
+
RUN git clone https://github.com/facebookresearch/sam-3d-body.git /app/sam-3d-body
|
|
|
|
|
|
|
| 30 |
|
| 31 |
# Copy application code
|
| 32 |
COPY app/ ./app/
|
app/sam_3d_service.py
CHANGED
|
@@ -5,6 +5,9 @@ from typing import Dict, Any, Optional, Callable
|
|
| 5 |
import numpy as np
|
| 6 |
import logging
|
| 7 |
|
|
|
|
|
|
|
|
|
|
| 8 |
# Set up logging
|
| 9 |
logging.basicConfig(level=logging.INFO)
|
| 10 |
logger = logging.getLogger(__name__)
|
|
|
|
| 5 |
import numpy as np
|
| 6 |
import logging
|
| 7 |
|
| 8 |
+
# Add SAM 3D Body repository to Python path
|
| 9 |
+
sys.path.append('/app/sam-3d-body')
|
| 10 |
+
|
| 11 |
# Set up logging
|
| 12 |
logging.basicConfig(level=logging.INFO)
|
| 13 |
logger = logging.getLogger(__name__)
|