Spaces:
Paused
Paused
Georg Claude Sonnet 4.5 commited on
Commit ·
d5c35b5
1
Parent(s): 4fd63bf
Remove Dockerfile - ZeroGPU Spaces use Python directly
Browse filesZeroGPU Spaces run with Python environment and requirements.txt,
not Docker. Removing Dockerfile to fix deployment.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Dockerfile +0 -78
Dockerfile
DELETED
|
@@ -1,78 +0,0 @@
|
|
| 1 |
-
# FoundationPose Dockerfile for Hugging Face Spaces with ZeroGPU
|
| 2 |
-
FROM nvidia/cuda:12.1.0-devel-ubuntu22.04
|
| 3 |
-
|
| 4 |
-
# Set environment variables
|
| 5 |
-
ENV DEBIAN_FRONTEND=noninteractive
|
| 6 |
-
ENV CUDA_HOME=/usr/local/cuda
|
| 7 |
-
ENV PATH=${CUDA_HOME}/bin:${PATH}
|
| 8 |
-
ENV LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
|
| 9 |
-
|
| 10 |
-
# FoundationPose model configuration
|
| 11 |
-
# Override these in Space settings to enable real model
|
| 12 |
-
ENV FOUNDATIONPOSE_MODEL_REPO=gpue/foundationpose-weights
|
| 13 |
-
ENV USE_HF_WEIGHTS=true
|
| 14 |
-
ENV USE_REAL_MODEL=false
|
| 15 |
-
|
| 16 |
-
# Install system dependencies
|
| 17 |
-
RUN apt-get update && apt-get install -y \
|
| 18 |
-
git \
|
| 19 |
-
wget \
|
| 20 |
-
python3.9 \
|
| 21 |
-
python3.9-dev \
|
| 22 |
-
python3-pip \
|
| 23 |
-
libgl1-mesa-glx \
|
| 24 |
-
libglib2.0-0 \
|
| 25 |
-
libeigen3-dev \
|
| 26 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 27 |
-
|
| 28 |
-
# Set Python 3.9 as default
|
| 29 |
-
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
|
| 30 |
-
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1
|
| 31 |
-
|
| 32 |
-
# Upgrade pip
|
| 33 |
-
RUN python3 -m pip install --upgrade pip setuptools wheel
|
| 34 |
-
|
| 35 |
-
# Set working directory
|
| 36 |
-
WORKDIR /app
|
| 37 |
-
|
| 38 |
-
# Copy requirements first for better caching
|
| 39 |
-
COPY requirements.txt .
|
| 40 |
-
|
| 41 |
-
# Install Python dependencies
|
| 42 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 43 |
-
|
| 44 |
-
# Install FoundationPose dependencies
|
| 45 |
-
RUN pip install --no-cache-dir \
|
| 46 |
-
git+https://github.com/NVlabs/nvdiffrast.git
|
| 47 |
-
|
| 48 |
-
# Install Kaolin (if using model-free mode)
|
| 49 |
-
RUN pip install --no-cache-dir kaolin==0.15.0 -f https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-2.0.0_cu118.html
|
| 50 |
-
|
| 51 |
-
# Install PyTorch3D
|
| 52 |
-
RUN pip install --no-cache-dir pytorch3d
|
| 53 |
-
|
| 54 |
-
# Clone FoundationPose repository
|
| 55 |
-
RUN git clone https://github.com/NVlabs/FoundationPose.git /app/FoundationPose
|
| 56 |
-
|
| 57 |
-
# Build FoundationPose C++ extensions
|
| 58 |
-
WORKDIR /app/FoundationPose
|
| 59 |
-
RUN bash build_all.sh || echo "Build completed with warnings"
|
| 60 |
-
|
| 61 |
-
# Copy application files
|
| 62 |
-
WORKDIR /app
|
| 63 |
-
COPY . .
|
| 64 |
-
|
| 65 |
-
# Download model weights from Hugging Face model repository
|
| 66 |
-
# The download_weights.py script will:
|
| 67 |
-
# 1. Check if weights already exist locally
|
| 68 |
-
# 2. Download from FOUNDATIONPOSE_MODEL_REPO if USE_HF_WEIGHTS=true
|
| 69 |
-
# 3. Fall back to placeholder mode if download fails
|
| 70 |
-
RUN echo "Downloading model weights from ${FOUNDATIONPOSE_MODEL_REPO}..." && \
|
| 71 |
-
python3 download_weights.py || \
|
| 72 |
-
echo "⚠️ Weights download failed or skipped. Space will run in placeholder mode."
|
| 73 |
-
|
| 74 |
-
# Expose port for Gradio
|
| 75 |
-
EXPOSE 7860
|
| 76 |
-
|
| 77 |
-
# Run the application
|
| 78 |
-
CMD ["python3", "app.py"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|