StableDiffusion/DockerFile
Prasant Poudel 083f326b08 issue #4 fix
2023-09-13 22:15:01 +05:45

21 lines
No EOL
623 B
Text

FROM pytorch/pytorch:1.12.1-cuda11.3-cudnn8-devel
RUN apt update && apt install --yes git ffmpeg libsm6 libxext6
# Create conda environment
RUN git clone https://github.com/Stability-AI/stablediffusion.git
WORKDIR /workspace/stablediffusion/
# Overwrite the environment.yaml file
COPY environment.yaml .
RUN conda env create -f environment.yaml
# Make RUN commands use the new environment:
SHELL ["conda", "run", "-n", "ldm", "/bin/bash", "-c"]
# Install xformers for memory efficient flash attention
RUN conda install xformers -c xformers/label/dev
RUN conda init bash
RUN echo "conda activate ldm" >> $HOME/.bashrc