Spaces:
Sleeping
Sleeping
| # Use an official PyTorch image with CUDA support | |
| FROM nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04 | |
| ARG TKN="hf_" | |
| # Set environment variables | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV TZ=Etc/UTC | |
| ENV HF_TKN=$TKN | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| wget \ | |
| curl \ | |
| build-essential \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| python3.10 \ | |
| python3.10-dev \ | |
| python3.10-venv \ | |
| python3-pip \ | |
| libxrender1 \ | |
| libxkbcommon-x11-0 \ | |
| libxi6 \ | |
| libsm6 \ | |
| libxext6 \ | |
| libglfw3-dev \ | |
| libgles2-mesa-dev\ | |
| git-lfs \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /workspace | |
| RUN git lfs install | |
| RUN git clone --recurse-submodules https://huggingface.co/spaces/PERCEIVE-Demos/autochrome-gen-cui | |
| WORKDIR /workspace/autochrome-gen-cui/ | |
| # Install requirements | |
| RUN pip install comfyui-frontend-package==1.11.8 | |
| RUN pip uninstall torch && pip uninstall torchaudio && pip uninstall torchvision | |
| RUN pip install -r requirements.txt | |
| # Patches for local demo | |
| WORKDIR /workspace/autochrome-gen-cui/custom_nodes/ComfyUI_Comfyroll_CustomNodes | |
| RUN rm node_mappings.py | |
| COPY patch/node_mappings.py /workspace/autochrome-gen-cui/custom_nodes/ComfyUI_Comfyroll_CustomNodes | |
| WORKDIR /workspace/autochrome-gen-cui/ | |
| RUN rm python.py | |
| COPY patch/python.py /workspace/autochrome-gen-cui/ | |