-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
102 lines (81 loc) · 3.14 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# anaconda base, python3.8.8
FROM pytorch/pytorch:1.8.1-cuda10.2-cudnn7-devel
# fixes : GPG error: https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
RUN rm /etc/apt/sources.list.d/cuda.list
RUN rm /etc/apt/sources.list.d/nvidia-ml.list
# build tools
RUN apt-get -y update
RUN apt-get -y install wget libssl-dev git
# install eigen, boost
RUN apt-get -y install libboost-all-dev libeigen3-dev
# clear cache
RUN rm -rf /var/lib/apt/lists/*
# install python packages
RUN conda install -y \
jupyterlab==3.0.14 \
matplotlib==3.3.4 \
numba==0.53.1 \
pandas==1.3.2 \
seaborn==0.11.2 \
sphinx==4.2.0 \
sphinx_rtd_theme==0.4.3
RUN conda install -y -c conda-forge \
coloredlogs==15.0 \
timeout-decorator==0.5.0 \
tensorboard==1.15.0
RUN conda install -y -c anaconda \
joblib==0.17.0
RUN pip install \
hydra-core==1.1.0 \
hydra-joblib-launcher==1.1.5
# install dev env
RUN conda install -y -c conda-forge flake8 black pytest mypy isort line_profiler
# for python-fcl
ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
WORKDIR /tmp
# install cmake
RUN wget https://github.com/Kitware/CMake/archive/refs/tags/v3.20.2.tar.gz -O cmake.tar.gz
RUN tar zxvf cmake.tar.gz
RUN cd CMake-3.20.2 && ./bootstrap && make -j4 && make install && cd ..
RUN hash -r
RUN rm -rf CMake-3.20.2
# install libccd
RUN git clone -b v2.1 https://github.com/danfis/libccd.git libccd
RUN cd libccd && cmake -B build && make -j4 -C build && make -C build install && cd ..
RUN rm -rf libccd
# install octomap
RUN git clone -b v1.9.7 https://github.com/OctoMap/octomap.git octomap
RUN cd octomap && cmake -B build && make -j4 -C build && make -C build install && cd ..
RUN rm -rf octomap
# install fcl
RUN git clone -b 0.5.0 https://github.com/flexible-collision-library/fcl.git fcl
RUN cd fcl && cmake -B build && make -j4 -C build && make -C build install && cd ..
RUN rm -rf fcl
# install python-fcl, there is no ubuntu version for conda
RUN pip install python-fcl==0.0.12
RUN pip install scikit-image==0.18.1
# install ompl
RUN git clone -b 1.5.2 https://github.com/ompl/ompl.git ompl
RUN cd ompl && cmake -B build && make -C build && make -C build install && cd ..
RUN rm -rf ompl
# install pybind11
RUN git clone -b v2.6.2 https://github.com/pybind/pybind11.git pybind11
RUN cd pybind11 && cmake -B build && make -j4 -C build && make -C build install && cd ..
RUN rm -rf pybind11
# install spars_wrapper
COPY cpp_helper/spars_wrapper/ spars_wrapper
RUN pip install spars_wrapper/
# install cost_to_go_wrapper
COPY cpp_helper/cost_to_go_wrapper/ cost_to_go_wrapper
RUN pip install cost_to_go_wrapper/
# install sphere_collision_check_wrapper
COPY cpp_helper/sphere_collision_check_wrapper/ sphere_collision_check_wrapper
RUN pip install sphere_collision_check_wrapper/
WORKDIR /workspace
# install ctrm, just making path
COPY setup.py .
COPY src/ src/
RUN pip install -e .
# alias
RUN echo 'alias j="jupyter lab --allow-root --ip=0.0.0.0 --ContentsManager.allow_hidden=True"' >> ~/.bashrc
RUN echo 'shopt -s autocd' >> ~/.bashrc