Skip to content

Instantly share code, notes, and snippets.

@cobanov
Created November 23, 2022 13:37
Show Gist options
  • Save cobanov/18e758901c3b4ee358600c69aef00794 to your computer and use it in GitHub Desktop.
Save cobanov/18e758901c3b4ee358600c69aef00794 to your computer and use it in GitHub Desktop.
FROM nvidia/cuda:11.3.0-runtime-ubuntu20.04
WORKDIR /nerfov
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
RUN apt-get update && apt-get -y install \
build-essential libpcre3 libpcre3-dev zlib1g zlib1g-dev libssl-dev wget git libgl1
# 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
RUN rm ~/miniconda.sh && \
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
# Put conda in path so we can use conda activate
ENV PATH=$CONDA_DIR/bin:$PATH
# Make RUN commands use the new environment:
RUN conda create --name nerfstudio -y python=3.7
SHELL ["conda", "run", "-n", "nerfstudio", "/bin/bash", "-c"]
RUN python -m pip install --upgrade pip
RUN pip install --upgrade pip && \
pip install gdown && \
pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 -f https://download.pytorch.org/whl/torch_stable.html
# Installing TinyCuda
RUN gdown "https://drive.google.com/u/1/uc?id=1q8fuc-Mqiev5GTBTRA5UPgCaQDzuqKqj"
RUN pip install tinycudann-1.6-cp37-cp37m-linux_x86_64.whl
# Installing COLMAP
RUN conda install -c conda-forge colmap
# Installing nerfstudio
RUN pip install nerfstudio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment