File size: 1,452 Bytes
cf89e54
ad7bc89
 
 
cf89e54
ad7bc89
 
dd150fe
 
 
 
 
 
 
 
 
 
ad7bc89
 
cf89e54
 
 
ad7bc89
 
 
cf89e54
ad7bc89
43b6675
 
ad7bc89
 
 
 
aed849d
 
ad7bc89
8d3da67
 
226ece7
 
dd150fe
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
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"]