This commit is contained in:
Prasant Poudel 2023-09-13 22:15:01 +05:45
parent cf1d67a6fd
commit 083f326b08
2 changed files with 23 additions and 1 deletions

21
DockerFile Normal file
View file

@ -0,0 +1,21 @@
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

View file

@ -3,7 +3,8 @@ channels:
- pytorch
- defaults
dependencies:
- python=3.8.5
# Changed to Python 3.9 to make use of precompiled binaries for xformers
- python=3.9
- pip=20.3
- cudatoolkit=11.3
- pytorch=1.12.1