CoolFace
Apppublic

evoneural/evoneuralIn3D-app

sourceHugging Faceapache-2.0updated 8mo agoView on Hugging Face
0likes
Dockerfile48 linesDownload Raw Back to root
1# Hugging Face Space: Streamlit on port 7860 (required by HF)2FROM python:3.10-slim3 4WORKDIR /app5 6# System deps: libxcb for OpenCV/rembg; cmake for torchmcubes; ffmpeg for imageio; xvfb for TripoSR texture baking (ModernGL needs a display)7RUN apt-get update && apt-get install -y --no-install-recommends \8    build-essential \9    cmake \10    curl \11    ffmpeg \12    git \13    libxcb1 \14    libxcb-shm0 \15    libxcb-render0 \16    libxcb-shape0 \17    libxcb-xfixes0 \18    xauth \19    xvfb \20    && rm -rf /var/lib/apt/lists/*21 22COPY requirements.txt requirements-docker.txt ./23# Install CPU-only PyTorch first so torchmcubes can build without CUDA (Docker build has no GPU/CUDA).24# If we install default torch (CUDA wheel), CMake fails: "Your installed Caffe2 version uses CUDA but I cannot find CUDA".25RUN pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu26# Install rest of deps without touching torch/torchvision (requirements-docker.txt omits them)27RUN pip install --no-cache-dir -r requirements-docker.txt28# torchmcubes: build deps for --no-build-isolation (scikit-build-core, pybind11, ninja)29RUN pip install --no-cache-dir scikit-build-core pybind11 ninja30# torchmcubes must be built after torch is installed (CMake needs TorchConfig.cmake); CPU Torch = no CUDA required at build.31RUN pip install --no-cache-dir --no-build-isolation "git+https://github.com/tatsy/torchmcubes.git"32 33# TripoSR repo (model downloaded at runtime from Hugging Face)34RUN git clone --depth 1 https://github.com/VAST-AI-Research/TripoSR.git TripoSR35 36COPY app.py .37COPY scripts/ ./scripts/38COPY pages/ ./pages/39COPY .streamlit/ ./.streamlit/40COPY entrypoint.sh /app/entrypoint.sh41RUN chmod +x /app/entrypoint.sh42 43# HF Spaces expose port 786044EXPOSE 786045HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health || true46# Start Xvfb in background then Streamlit (avoids xvfb-run which can hang in HF Spaces)47ENTRYPOINT ["/app/entrypoint.sh"]48