Spaces:
Paused
Paused
File size: 1,162 Bytes
3968781 9f36f2f bbc3fdc 2df2c23 3968781 2df2c23 dd44013 2df2c23 c05ac4f 96b4daf e317b3c f895f87 c05ac4f 1fd398f 3968781 c05ac4f 2df2c23 bbc3fdc 2df2c23 c05ac4f 2df2c23 3968781 42ce71e 2df2c23 | 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 | # Final stage Dockerfile - optimized for HuggingFace
# Uses devel base image (includes CUDA compiler tools)
FROM gpue/foundationpose-base:latest
# FoundationPose configuration
ENV FOUNDATIONPOSE_MODEL_REPO=gpue/foundationpose-weights
ENV USE_REAL_MODEL=true
# Ensure NumPy 1.x for CUDA extension compatibility
RUN pip install --no-cache-dir "numpy<2" transformers \
&& pip install --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py310_cu118_pyt210/download.html
# Set MAX_JOBS=1 BEFORE any CUDA compilation to limit memory usage
ENV MAX_JOBS=1
# Install nvdiffrast (CUDA rasterizer) - needs GPU, build here
RUN pip install --no-cache-dir --no-build-isolation git+https://github.com/NVlabs/nvdiffrast.git
# Build CUDA extensions (requires GPU - only part that needs HuggingFace GPU)
WORKDIR /app/FoundationPose
RUN cd bundlesdf/mycuda && pip install . --no-build-isolation
# Note: mycpp build, weights download, and build deps are already in base image
WORKDIR /app
# Copy application files (placed here so changes don't require base image rebuild)
COPY app.py client.py estimator.py ./
CMD ["python3", "app.py"]
|