mirror of
https://github.com/gryf/coach.git
synced 2025-12-18 11:40:18 +01:00
add dockerfile
This commit is contained in:
32
docker/Dockerfile
Normal file
32
docker/Dockerfile
Normal file
@@ -0,0 +1,32 @@
|
||||
FROM ubuntu:16.04
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y \
|
||||
python3-pip cmake zlib1g-dev python3-tk python-opencv \
|
||||
libboost-all-dev \
|
||||
libblas-dev liblapack-dev libatlas-base-dev gfortran \
|
||||
libsdl-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev \
|
||||
libsmpeg-dev libportmidi-dev libavformat-dev libswscale-dev \
|
||||
dpkg-dev build-essential python3.5-dev libjpeg-dev libtiff-dev \
|
||||
libsdl1.2-dev libnotify-dev freeglut3 freeglut3-dev libsm-dev \
|
||||
libgtk2.0-dev libgtk-3-dev libwebkitgtk-dev libgtk-3-dev \
|
||||
libwebkitgtk-3.0-dev libgstreamer-plugins-base1.0-dev \
|
||||
libav-tools libsdl2-dev swig
|
||||
|
||||
# installing python dependencies
|
||||
RUN pip3 install --upgrade pip
|
||||
|
||||
RUN mkdir /root/src
|
||||
COPY setup.py /root/src/.
|
||||
COPY README.md /root/src/.
|
||||
WORKDIR /root/src
|
||||
RUN pip3 install -e .
|
||||
#
|
||||
COPY . /root/src
|
||||
WORKDIR /root/src
|
||||
RUN pip3 install -e .
|
||||
|
||||
# RUN pip3 install rl_coach
|
||||
|
||||
# CMD ["coach", "-p", "CartPole_PG", "-e", "cartpole"]
|
||||
CMD python3 rl_coach/rollout_worker.py
|
||||
38
docker/Makefile
Normal file
38
docker/Makefile
Normal file
@@ -0,0 +1,38 @@
|
||||
IMAGE=zdwiel/coach
|
||||
# IMAGE=gcr.io/deep-greens/inference:v5
|
||||
|
||||
BUILD_ARGUMENTS=
|
||||
RUN_ARGUMENTS=
|
||||
ifdef http_proxy
|
||||
BUILD_ARGUMENTS+=--build-arg http_proxy=$(http_proxy)
|
||||
RUN_ARGUMENTS+=--env http_proxy=$(http_proxy)
|
||||
endif
|
||||
|
||||
ifdef https_proxy
|
||||
BUILD_ARGUMENTS+=--build-arg https_proxy=$(https_proxy)
|
||||
RUN_ARGUMENTS+=--env https_proxy=$(https_proxy)
|
||||
endif
|
||||
|
||||
RUN_ARGUMENTS+=--rm
|
||||
RUN_ARGUMENTS+=--net host
|
||||
|
||||
CONTEXT = $(realpath ..)
|
||||
|
||||
ifndef DOCKER
|
||||
DOCKER = docker
|
||||
endif
|
||||
|
||||
build:
|
||||
${DOCKER} build -f=Dockerfile -t=${IMAGE} ${BUILD_ARGUMENTS} ${CONTEXT}
|
||||
|
||||
shell: build
|
||||
${DOCKER} run ${RUN_ARGUMENTS} -it ${IMAGE} /bin/bash
|
||||
|
||||
test: build
|
||||
${DOCKER} run ${RUN_ARGUMENTS} -it ${IMAGE} py.test tests
|
||||
|
||||
run: build
|
||||
${DOCKER} run ${RUN_ARGUMENTS} -it ${IMAGE}
|
||||
|
||||
push:
|
||||
docker push ${IMAGE}
|
||||
Reference in New Issue
Block a user