-
Notifications
You must be signed in to change notification settings - Fork 61
/
Dockerfile
47 lines (40 loc) · 1.31 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
ARG PARENT_IMAGE
FROM $PARENT_IMAGE
ARG USE_GPU
RUN apt-get -y update \
&& apt-get -y install \
curl \
cmake \
default-jre \
git \
jq \
python-dev \
python-pip \
python3-dev \
libfontconfig1 \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender1 \
libopenmpi-dev \
zlib1g-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ENV CODE_DIR /root/code
ENV VENV /root/venv
COPY ./stable_baselines/version.txt ${CODE_DIR}/stable-baselines/stable_baselines/version.txt
COPY ./setup.py ${CODE_DIR}/stable-baselines/setup.py
RUN \
pip install pip --upgrade && \
pip install virtualenv && \
virtualenv $VENV --python=python3 && \
. $VENV/bin/activate && \
pip install --upgrade pip && \
cd ${CODE_DIR}/stable-baselines && \
pip install -e .[mpi,tests,docs] && \
rm -rf $HOME/.cache/pip
ENV PATH=$VENV/bin:$PATH
# Codacy code coverage report: used for partial code coverage reporting
RUN cd $CODE_DIR && \
curl -Ls -o codacy-coverage-reporter.jar "$(curl -Ls https://api.github.com/repos/codacy/codacy-coverage-reporter/releases/latest | jq -r '.assets | map({name, browser_download_url} | select(.name | (startswith("codacy-coverage-reporter") and contains("assembly") and endswith(".jar")))) | .[0].browser_download_url')"
CMD /bin/bash