Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please make a Dockerfile #4

Open
zackees opened this issue Nov 24, 2022 · 5 comments
Open

Please make a Dockerfile #4

zackees opened this issue Nov 24, 2022 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@zackees
Copy link

zackees commented Nov 24, 2022

This would allow people to spin up an instance very fast.

@0xdevalias
Copy link

@xiankgx
Copy link

xiankgx commented Nov 25, 2022

Dockerfile

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

Modified environment file .

name: ldm
channels:
  - pytorch
  - defaults
dependencies:
  # Changed to Python 3.9 to make use of precompiled binaries for xformers
  - python=3.9
  - pip
  - cudatoolkit=11.3
  - pytorch=1.12.1
  - torchvision=0.13.1
  - numpy=1.23.1
  - pip:
    - albumentations==1.3.0
    - opencv-python==4.6.0.66
    - imageio==2.9.0
    - imageio-ffmpeg==0.4.2
    - pytorch-lightning==1.4.2
    - omegaconf==2.1.1
    - test-tube>=0.7.5
    - streamlit==1.12.1
    - einops==0.3.0
    - transformers==4.19.2
    - webdataset==0.2.5
    - kornia==0.6
    - open_clip_torch==2.0.2
    - invisible-watermark>=0.1.5
    - streamlit-drawable-canvas==0.8.0
    - torchmetrics==0.6.0
    - -e .

@dmarx dmarx added enhancement New feature or request good first issue Good for newcomers labels Nov 28, 2022
@bsefton12
Copy link

prasantpoudel added a commit to prasantpoudel/stablediffusion that referenced this issue Sep 13, 2023
@GeoDerp
Copy link

GeoDerp commented Sep 19, 2023

Sorry @prasantpoudel & @xiankgx for standing on your toes !
I guess I have just made another one. Pull request here: #326
Does yours have the same issues as mine?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

7 participants