File size: 1,353 Bytes
c781b57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
31
32
33
34
35
36
37
38
39
40
41
42
43
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Forked from nvidia/Kimodo. We replace the Viser entrypoint (kimodo_demo)
# with a thin Gradio API server (server.py) that exposes /gradio_api/call/kimodo_motion
# for the GengaMachines webapp.

FROM nvcr.io/nvidia/pytorch:24.10-py3

ENV DEBIAN_FRONTEND=noninteractive \
    PIP_DISABLE_PIP_VERSION_CHECK=1 \
    PYTHONDONTWRITEBYTECODE=1 \
    PYTHONUNBUFFERED=1 \
    HF_HOME=/data/.huggingface \
    XDG_CACHE_HOME=/data/.cache \
    PIP_CACHE_DIR=/data/.cache/pip

WORKDIR /workspace

RUN apt-get update && apt-get install -y --no-install-recommends \
      git curl ca-certificates \
      cmake build-essential \
    && rm -rf /var/lib/apt/lists/*

RUN rm -f /usr/local/bin/cmake || true

COPY requirements.txt /workspace/requirements.txt
ARG GITHUB_TOKEN=

RUN --mount=type=cache,target=/root/.cache/pip \
    --mount=type=secret,id=GITHUB_TOKEN,mode=0444,required=false \
    python -m pip install --upgrade pip \
 && python -m pip install -r requirements.txt;

# Our custom files: replace the Viser demo with a Gradio API.
COPY server.py /workspace/server.py
COPY constraints_schema.py /workspace/constraints_schema.py
COPY start.sh /start.sh
RUN chmod +x /start.sh

EXPOSE 7860
ENTRYPOINT ["/start.sh"]