-
Notifications
You must be signed in to change notification settings - Fork 25
/
Dockerfile
78 lines (66 loc) · 1.73 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
# parameters
ARG REPO_NAME="gym-duckietown"
ARG DESCRIPTION="Gym Duckietown"
ARG MAINTAINER="Andrea Censi ([email protected])"
# pick an icon from: https://fontawesome.com/v4.7.0/icons/
ARG ICON="box"
# ==================================================>
# ==> Do not change the code below this line
ARG ARCH
ARG DISTRO=daffy
ARG DOCKER_REGISTRY=docker.io
ARG BASE_IMAGE=dt-commons
ARG BASE_TAG=${DISTRO}-${ARCH}
ARG LAUNCHER=default
# define base image
FROM ${DOCKER_REGISTRY}/duckietown/${BASE_IMAGE}:${BASE_TAG} as base
# recall all arguments
ARG ARCH
ARG DISTRO
ARG REPO_NAME
ARG DESCRIPTION
ARG MAINTAINER
ARG ICON
ARG BASE_TAG
ARG BASE_IMAGE
ARG LAUNCHER
# - buildkit
ARG TARGETPLATFORM
ARG TARGETOS
ARG TARGETARCH
ARG TARGETVARIANT
# <== Do not change the code above this line
# <==================================================
# install dependencies
RUN apt-get update -y && apt-get install -y \
freeglut3-dev \
libglib2.0-0 \
libsm6 \
libxrender1 \
libxext6 \
python3-pip \
python3-numpy \
python3-scipy \
wget \
curl \
vim \
git \
xvfb \
&& \
rm -rf /var/lib/apt/lists/*
WORKDIR /gym-duckietown
## first install the ones that do not change
COPY requirements.pin.txt .
RUN python3 -m pip install -r requirements.pin.txt
COPY requirements.* ./
RUN python3 -m pip install -r requirements.txt && \
python3 -m pip install pyglet==1.5.15
COPY . .
RUN python3 setup.py sdist && \
tar tfz dist/* && \
python3 -m pip install dist/*
RUN python3 -c "import gym_duckietown;print(gym_duckietown.__file__)" && \
python3 -c "from gym_duckietown.randomization import Randomizer; r = Randomizer()" && \
python3 -c "import cv2" && \
pipdeptree
ENTRYPOINT [ "xvfb-run" ]