FROM nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04 ENV DEBIAN_FRONTEND=noninteractive \ PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ PIP_NO_CACHE_DIR=1 \ HF_HOME=/workspace/.cache/huggingface \ TRANSFORMERS_CACHE=/workspace/.cache/huggingface \ TORCH_HOME=/workspace/.cache/torch RUN apt-get update && apt-get install -y --no-install-recommends \ python3 \ python3-pip \ python3-dev \ git \ git-lfs \ build-essential \ libglib2.0-0 \ libsm6 \ libxext6 \ libxrender1 \ libgl1 \ && rm -rf /var/lib/apt/lists/* RUN python3 -m pip install --upgrade pip setuptools wheel WORKDIR /workspace/T-Stitch/ldm COPY ldm/requirements.txt /tmp/ldm-requirements.txt RUN python3 -m pip install \ torch \ torchvision \ torchaudio \ --index-url https://download.pytorch.org/whl/cu124 COPY ldm /workspace/T-Stitch/ldm RUN python3 -m pip install -r /tmp/ldm-requirements.txt RUN mkdir -p /workspace/T-Stitch/ldm/pretrained_models /workspace/.cache/huggingface CMD ["/bin/bash"]