mirror of
https://github.com/Stability-AI/stablediffusion.git
synced 2024-12-22 15:44:58 +00:00
issue #4 fix
This commit is contained in:
parent
cf1d67a6fd
commit
083f326b08
2 changed files with 23 additions and 1 deletions
21
DockerFile
Normal file
21
DockerFile
Normal 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
|
|
@ -3,7 +3,8 @@ channels:
|
||||||
- pytorch
|
- pytorch
|
||||||
- defaults
|
- defaults
|
||||||
dependencies:
|
dependencies:
|
||||||
- python=3.8.5
|
# Changed to Python 3.9 to make use of precompiled binaries for xformers
|
||||||
|
- python=3.9
|
||||||
- pip=20.3
|
- pip=20.3
|
||||||
- cudatoolkit=11.3
|
- cudatoolkit=11.3
|
||||||
- pytorch=1.12.1
|
- pytorch=1.12.1
|
||||||
|
|
Loading…
Reference in a new issue