Spaces:
Paused
Paused
Download Dockerfile from drrobot9/neural-forge: direct link, hf CLI and curl.
- Browser
- Download file 1.42 kB
-
https://huggingface.co/spaces/drrobot9/neural-forge/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/drrobot9/neural-forge/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/drrobot9/neural-forge/resolve/main/Dockerfile
1.42 kB
| FROM pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime | |
| ENV DEBIAN_FRONTEND=noninteractive \ | |
| PYTHONUNBUFFERED=1 \ | |
| PIP_NO_CACHE_DIR=1 | |
| RUN apt-get update \ | |
| && apt-get install -y --no-install-recommends libgl1 libglib2.0-0 libgles2 libegl1 wget ca-certificates \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt /tmp/requirements.txt | |
| RUN pip install --upgrade pip \ | |
| && pip install -r /tmp/requirements.txt \ | |
| && pip uninstall -y opencv-python opencv-contrib-python opencv-python-headless opencv-contrib-python-headless onnxruntime onnxruntime-gpu \ | |
| && pip install "opencv-contrib-python-headless<4.12" "onnxruntime-gpu>=1.19.0" | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| HF_HOME=/home/user/.cache/huggingface | |
| WORKDIR /home/user/app | |
| COPY --chown=user . /home/user/app | |
| RUN mkdir -p assets \ | |
| && wget -q -O assets/face_landmarker.task https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/1/face_landmarker.task \ | |
| && wget -q -O assets/hand_landmarker.task https://storage.googleapis.com/mediapipe-models/hand_landmarker/hand_landmarker/float16/1/hand_landmarker.task | |
| RUN python -c "from rtmlib import Wholebody; Wholebody(to_openpose=False, mode='balanced', backend='onnxruntime', device='cpu')" || echo "Pose weights will download on first start" | |
| EXPOSE 7860 | |
| CMD ["bash", "start.sh"] | |