-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
85 lines (69 loc) · 2.33 KB
/
Dockerfile
File metadata and controls
85 lines (69 loc) · 2.33 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
FROM nvidia/cuda:11.3.1-devel-ubuntu20.04
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC
# You should modify this to match your GPU compute capability
ENV TORCH_CUDA_ARCH_LIST="6.1 7.0 7.5 8.6+PTX"
ENV TORCH_NVCC_FLAGS="-Xfatbin -compress-all"
RUN apt-get update && \
apt-get -y install sudo
RUN apt-get install -y wget && rm -rf /var/lib/apt/lists/*
# install packages
RUN apt-get update
RUN apt-get install build-essential cmake -y
RUN apt-get install -y git
RUN apt-get install ffmpeg libsm6 libxext6 libx11-dev libopenblas-dev libglvnd0 libgl1 libglx0 libegl1 -y
RUN apt-get install -y unzip
RUN nvcc --version
# Add user
ENV user lg
RUN useradd -m -d /home/user user && \
chown -R user /home/user && \
adduser user sudo && \
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER user
WORKDIR /home/user
ENV PATH="/home/user/.local/bin:${PATH}"
# Install conda
ENV PATH="/home/user/miniconda3/bin:${PATH}"
ARG PATH="/home/user/miniconda3/bin:${PATH}"
RUN wget \
https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
&& mkdir /home/user/.conda \
&& bash Miniconda3-latest-Linux-x86_64.sh -b \
&& rm -f Miniconda3-latest-Linux-x86_64.sh
RUN conda --version
# Create the environment:
COPY --chown=user:user environment.yml .
RUN conda init bash
RUN conda env create -f environment.yml
# Make RUN commands use the new environment:
RUN echo 'cd /home/user/' >> /home/user/.bashrc
RUN echo 'conda activate vapo_env' >> /home/user/.bashrc
RUN echo 'export MESA_GL_VERSION_OVERRIDE=3.3' >> /home/user/.bashrc
SHELL ["conda", "run", "-n", "vapo_env", "/bin/bash", "-c"]
# Install bullet
RUN pip install pybullet
#RUN pip install numpy
# Install VREnv
WORKDIR /home/user/
RUN git clone https://github.com/mees/vapo.git
WORKDIR /home/user/vapo/VREnv
# RUN chmod u+x egl_check/EGL_options.o
RUN pip install -e .
# Install vapo
WORKDIR /home/user/vapo/
RUN pip install -e .
SHELL ["/bin/sh", "-c"]
WORKDIR /home/user/vapo/trained_models
RUN bash download_model_weights.sh
SHELL ["conda", "run", "-n", "vapo_env", "/bin/bash", "-c"]
# Install hough voting layer
WORKDIR /home/user/
RUN git clone https://gitlab.com/libeigen/eigen.git
WORKDIR /home/user/eigen/
RUN mkdir build/
WORKDIR /home/user/eigen/build
RUN cmake ..
RUN sudo make install
WORKDIR /home/user/vapo/vapo/affordance/hough_voting/
RUN python setup.py install