This repository has been archived by the owner on Jun 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
71 lines (66 loc) · 1.76 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
# From https://github.com/bengreenier/docker-xvfb/
FROM ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris
RUN apt-get update -y \
&& apt-get install --no-install-recommends -y \
xvfb \
wget \
tar \
xz-utils \
libx11-6 \
libxcb1 \
libxau6 \
dbus-x11 \
x11-utils \
libxkbcommon-x11-0 \
libavcodec-dev \
libavformat-dev \
libswscale-dev \
python3.9-full \
python3.9-dev \
python3-opengl \
build-essential \
libffi-dev \
freeglut3-dev \
freeglut3 \
libglu1-mesa \
libglu1-mesa-dev \
libgl1-mesa-glx \
libgl1-mesa-dev \
libgl1-mesa-dri \
libxext-dev \
libxt-dev \
git \
&& rm -rf /var/lib/apt/lists/*
# Install coppelia
RUN mkdir -p /opt
WORKDIR /opt
RUN wget https://coppeliarobotics.com/files/CoppeliaSim_Edu_V4_1_0_Ubuntu20_04.tar.xz && \
tar -xf CoppeliaSim_Edu_V4_1_0_Ubuntu20_04.tar.xz -C /opt && \
rm CoppeliaSim_Edu_V4_1_0_Ubuntu20_04.tar.xz
# Do extra step from PyRep
RUN wget https://bootstrap.pypa.io/get-pip.py && \
python3.9 get-pip.py && \
python3.9 -m pip --version
ENV COPPELIASIM_ROOT=/opt/CoppeliaSim_Edu_V4_1_0_Ubuntu20_04
ENV LD_LIBRARY_PATH=$COPPELIASIM_ROOT:$LD_LIBRARY_PATH
ENV QT_QPA_PLATFORM_PLUGIN_PATH=$COPPELIASIM_ROOT
COPY PyRep /opt/PyRep/
WORKDIR /opt/PyRep
RUN python3.9 -m pip install -r requirements.txt && \
python3.9 -m pip install -e .
# And finally install Hiveformer dependencies
COPY requirements.txt /opt/requirements.txt
RUN python3.9 -m pip install -r /opt/requirements.txt
# Install Xvfb through external script
WORKDIR /usr/bin
COPY xvfb-startup.sh .
RUN sed -i 's/\r$//' xvfb-startup.sh
ARG RESOLUTION="224x224x24"
ENV XVFB_RES="${RESOLUTION}"
ARG XARGS=""
ENV XVFB_ARGS="${XARGS}"
ENTRYPOINT ["/bin/bash", "xvfb-startup.sh"]
# Test if everything is fine
CMD glxgears