Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
manager
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.idea
.idea
log
manager/docker/hub/hub
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM python:3.6
MAINTAINER andrey.u@gmail.com

RUN apt-get update
RUN apt-get install -y screen

COPY manager/docker/hub/hub /usr/local/bin/manager
COPY optimization/ /optimization

RUN pip install -r /optimization/requirements.txt
RUN pip install numpy
RUN pip install git+https://github.com/oblalex/gnuplot.py-py3k.git
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AleksZhuravljov Could we add this libraries in the requirements?


RUN if [ -d /optimization/optimizer/outlet ] ; then rm -rf /optimization/optimizer/outlet ; fi

# patch configs
RUN sed -i 's/python3/python/g' /optimization/cycle_run.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AleksZhuravljov Could we somehow make the installation more simple? Why it requires such a tweaks?

RUN sed -i 's/"make_drawing": true/"make_drawing": false/' /optimization/optimizer/routermgt_inlet.json
RUN sed -i 's/"output_period": .$/"output_period": 15000/' /optimization/optimizer/routermgt_inlet.json

CMD bash -c "cd /optimization; ./cycle_run.sh |& tee /optimization/optimizer/outlet/std.log"
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
IMAGE:=hub:0.1

test:
echo $(shell whoami)

build:
docker build -t $(IMAGE) .

run:
if [ ! -d log ] ; then mkdir log; fi
docker run -ti \
--mount type=bind,src=$(shell pwd)/log,dst=/optimization/optimizer/outlet \
$(IMAGE)

push:
docker push $(IMAGE)