From 09263abc90a285c9e634595f4651733c5ed8e740 Mon Sep 17 00:00:00 2001 From: Scott Date: Sun, 17 Apr 2022 15:30:23 -0400 Subject: [PATCH 1/2] Add dockerfile --- Dockerfile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..5997dba03 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM nvidia/cuda:11.0-base +RUN apt update +RUN apt install python3 python3-dev python3-pip wget build-essential git -y +RUN python3 -m pip install --upgrade pip +RUN apt-get clean -y +RUN rm -rf /var/lib/apt/lists/* + +# Install miniconda +ENV CONDA_DIR /opt/conda +RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \ + /bin/bash ~/miniconda.sh -b -p /opt/conda + +# Put conda in path so we can use conda activate +ENV PATH=$CONDA_DIR/bin:$PATH + +COPY . /diffusion +WORKDIR /diffusion +RUN conda env create -f environment.yaml +RUN conda init bash +RUN /bin/bash -c "source /root/.bashrc" +SHELL ["conda", "run", "-n", "ldm", "/bin/bash", "-c"] +ENTRYPOINT [ "conda", "run", "--no-capture-output", "-n", "ldm"] \ No newline at end of file From ee9e721b7f8f02ceb8f204d05baef7765e040c50 Mon Sep 17 00:00:00 2001 From: Scott Date: Sun, 17 Apr 2022 15:41:58 -0400 Subject: [PATCH 2/2] Update pytorch-lightning version in conda env --- environment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yaml b/environment.yaml index f36b0e17d..b0d6355e8 100644 --- a/environment.yaml +++ b/environment.yaml @@ -15,7 +15,7 @@ dependencies: - pudb==2019.2 - imageio==2.9.0 - imageio-ffmpeg==0.4.2 - - pytorch-lightning==1.4.2 + - pytorch-lightning==1.5 - omegaconf==2.1.1 - test-tube>=0.7.5 - streamlit>=0.73.1