-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
65 lines (59 loc) · 2.03 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
FROM nvidia/cuda:12.1.1-runtime-ubuntu22.04
WORKDIR /root
# Install system dependencies
ENV DEBIAN_FRONTEND="noninteractive" TZ="America/Phoenix"
RUN apt update && apt install -y --no-install-recommends software-properties-common
RUN apt install -y --no-install-recommends \
g++ \
cmake \
pkg-config \
libboost-serialization-dev \
libboost-filesystem-dev \
libboost-system-dev \
libboost-program-options-dev \
libboost-test-dev \
libboost-python-dev \
libboost-numpy-dev \
libeigen3-dev \
libode-dev \
wget \
libyaml-cpp-dev \
python3-pip \
git \
curl \
build-essential \
castxml \
pypy3 \
unzip \
liborocos-kdl-dev \
libkdl-parser-dev \
liburdfdom-dev \
libnlopt-dev \
libnlopt-cxx-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt
RUN apt update && apt install -y --no-install-recommends libgl1-mesa-glx libgl1-mesa-dri \
&& echo "export LIBGL_DRIVERS_PATH=/usr/lib/x86_64-linux-gnu/dri" >> /root/.bashrc
# Install OMPL
RUN python3 -m pip install -vU pygccxml pyplusplus \
&& git clone --recurse-submodules https://github.com/ompl/ompl.git \
&& export CXX=g++ \
&& export MAKEFLAGS="-j `nproc`" \
&& mkdir -p ompl/build/Release \
&& cd ompl/build/Release \
&& cmake ../.. -DPYTHON_EXEC=/usr/bin/python3 \
&& make update_bindings \
&& make \
&& make install \
# hacky way to allow python ompl import
&& echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib" >> /root/.bashrc
# Install miniconda
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
&& bash Miniconda3-latest-Linux-x86_64.sh -b \
&& rm -f Miniconda3-latest-Linux-x86_64.sh \
&& /root/miniconda3/bin/conda init \
&& /root/miniconda3/bin/conda create -n xmop_dev python=3.10.13 \
&& echo "conda activate xmop_dev" >> /root/.bashrc \
&& mkdir -p /root/miniconda3/envs/xmop_dev/etc/conda/activate.d \
&& echo "export PYTHONPATH=/root/xmop:$PYTHONPATH" >> /root/miniconda3/envs/xmop_dev/etc/conda/activate.d/env_vars.sh
WORKDIR /root