forked from google-deepmind/open_spiel
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
47 lines (43 loc) · 1.17 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
FROM ubuntu:20.04 as base
RUN apt update
RUN dpkg --add-architecture i386 && apt update
RUN apt-get -y install \
clang \
curl \
git \
python3 \
python3-dev \
python3-pip \
python3-setuptools \
python3-wheel \
sudo
RUN mkdir repo
WORKDIR /repo
RUN sudo pip3 install --upgrade pip
RUN sudo pip3 install matplotlib
# install
COPY . .
RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata
RUN ./install.sh
RUN pip3 install --upgrade setuptools testresources
RUN pip3 install --upgrade -r requirements.txt
RUN pip3 install --upgrade cmake
# build and test
RUN mkdir -p build
WORKDIR /repo/build
RUN cmake -DPython3_EXECUTABLE=`which python3` -DCMAKE_CXX_COMPILER=`which clang++` ../open_spiel
RUN make -j12
ENV PYTHONPATH=${PYTHONPATH}:/repo
ENV PYTHONPATH=${PYTHONPATH}:/repo/build/python
RUN ctest -j12
WORKDIR /repo/open_spiel
# minimal image for development in Python
FROM python:3.6-slim-buster as python-slim
RUN mkdir repo
WORKDIR /repo
COPY --from=base /repo .
RUN pip3 install --upgrade -r requirements.txt
RUN pip3 install matplotlib
ENV PYTHONPATH=${PYTHONPATH}:/repo
ENV PYTHONPATH=${PYTHONPATH}:/repo/build/python
WORKDIR /repo/open_spiel