FROM continuumio/miniconda3 RUN apt-get update && apt-get install --no-install-recommends -y \ build-essential \ libxml2 \ && apt-get clean && rm -rf /var/lib/apt/lists/* RUN useradd -m -u 1000 user USER user ENV HOME=/home/user ENV PATH=/home/user/.local/bin:$PATH WORKDIR $HOME/app # Copy the current directory contents into the container at $HOME/app setting the owner to the user COPY --chown=user . $HOME/app # Install dependencies RUN conda create -n pose python=3.8 # Make RUN commands use the new environment: SHELL ["conda", "run", "-n", "pose", "/bin/bash", "-c"] RUN pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu118 RUN pip install -r requirements.txt RUN pip install xformers==0.0.22.post7 --index-url https://download.pytorch.org/whl/cu118 RUN conda install -c conda-forge cudatoolkit-dev -y ENV CUDA_HOME=$CONDA_PREFIX/pkgs/cuda-toolkit/ RUN pip install "git+https://github.com/facebookresearch/pytorch3d.git@stable" RUN wget https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0.safetensors -P pretrained-models RUN wget https://huggingface.co/stabilityai/sdxl-vae/resolve/main/sdxl_vae.safetensors -P pretrained-models RUN git clone https://github.com/customdiffusion360/custom-diffusion360.git ENV GRADIO_SERVER_NAME=0.0.0.0 ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "pose", "python", "app.py"]