Skip to content

Commit

Permalink
issue Stability-AI#4 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
prasantpoudel committed Sep 13, 2023
1 parent cf1d67a commit 083f326
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
21 changes: 21 additions & 0 deletions DockerFile
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 083f326

Please sign in to comment.