-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathDockerfile
68 lines (52 loc) · 2.04 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Dockerfile
#
# Created on Tue Nov 30 2023 by Florian Pfleiderer
#
# Copyright (c) 2023 TU Wien
# nvidia cuda base image
FROM nvidia/cuda:11.6.1-base-ubuntu20.04
# Set the working directory in the container
WORKDIR /scene-rf
# Set noninteractive mode
ENV DEBIAN_FRONTEND=noninteractive
# Install git and wget
RUN apt-get update && \
apt-get install -y git wget cmake gcc g++ libgl1-mesa-glx libglib2.0-0 unzip && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Reset noninteractive mode
ENV DEBIAN_FRONTEND=dialog
# Install miniconda.
ENV CONDA_DIR $HOME/miniconda3
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
chmod +x ~/miniconda.sh && \
~/miniconda.sh -b -p $CONDA_DIR && \
rm ~/miniconda.sh
# Make non-activate conda commands available.
ENV PATH=$CONDA_DIR/bin:$PATH
# Make conda activate command available from /bin/bash --login shells.
RUN echo ". $CONDA_DIR/etc/profile.d/conda.sh" >> ~/.profile
# Make conda activate command available from /bin/bash --interative shells.
RUN conda init bash
# start shell in login mode
SHELL ["/bin/bash", "--login", "-c"]
# run updates
RUN conda update -n base -c defaults conda
# Download pretrained model
RUN wget https://www.rocq.inria.fr/rits_files/computer-vision/scenerf/scenerf_bundlefusion.ckpt
COPY requirements.txt setup.py ./
# Create a Conda environment
RUN conda create -y -n scenerf python=3.7
RUN conda install -y -n scenerf -c pytorch pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=10.2
RUN conda install -y -n scenerf -c bioconda tbb=2020.2
ENV SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True
RUN conda activate scenerf && pip install -r requirements.txt
RUN conda activate scenerf && pip install torchmetrics==0.6.0
#install scenerf
RUN conda activate scenerf && pip install -e .
# start container in cyws3d env
RUN touch ~/.bashrc && echo "conda activate scenerf" >> ~/.bashrc
COPY scenerf/ scenerf/
COPY teaser/ teaser/
# Set the default command to run when the container starts
CMD ["bash"]