diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..2e95b1e44 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,32 @@ +FROM nvidia/cuda:11.1.1-devel-ubuntu20.04 + +ENV PATH /opt/conda/bin:$PATH + +RUN apt-get update --fix-missing && \ + apt-get install -y wget bzip2 ca-certificates curl git && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-py38_4.11.0-Linux-x86_64.sh -O ~/miniconda.sh && \ + /bin/bash ~/miniconda.sh -b -p /opt/conda && \ + rm ~/miniconda.sh && \ + /opt/conda/bin/conda clean -tipsy && \ + ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \ + echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \ + echo "conda activate base" >> ~/.bashrc + +ENV LD_LIBRARY_PATH /usr/local/cuda-11.1/lib64:/usr/local/cuda-11.1/extras/CUPTI/lib64:$LD_LIBRARY_PATH + +WORKDIR /ldm + +# Create the environment: +COPY environment.yaml . +COPY ldm /ldm/ldm +COPY configs /ldm/configs +COPY scripts /ldm/scripts +COPY setup.py /ldm/ +COPY notebook_helpers.py /ldm/ +RUN conda env create -f environment.yaml +RUN echo "conda activate ldm" >> ~/.bashrc +SHELL ["/bin/bash", "--login", "-c"] +# The code to run when container is started: diff --git a/environment.yaml b/environment.yaml index f36b0e17d..bf7f24dc4 100644 --- a/environment.yaml +++ b/environment.yaml @@ -2,12 +2,13 @@ name: ldm channels: - pytorch - defaults + - conda-forge dependencies: - python=3.8.5 - pip=20.3 - - cudatoolkit=11.0 - - pytorch=1.7.0 - - torchvision=0.8.1 + - cudatoolkit=11.1 + - pytorch=1.8.0 + - torchvision=0.9.0 - numpy=1.19.2 - pip: - albumentations==0.4.3 @@ -15,7 +16,7 @@ dependencies: - pudb==2019.2 - imageio==2.9.0 - imageio-ffmpeg==0.4.2 - - pytorch-lightning==1.4.2 + - pytorch-lightning==1.6.1 - omegaconf==2.1.1 - test-tube>=0.7.5 - streamlit>=0.73.1