Prepare for production

This commit is contained in:
Florent Guiotte 2018-09-19 18:21:37 +02:00
parent 1687e00799
commit 959f55acf8
3 changed files with 7 additions and 5 deletions

View File

@ -1,10 +1,7 @@
FROM base/archlinux FROM base/archlinux
#FROM arch-python
WORKDIR /app WORKDIR /app
ADD . /app
# Update # Update
RUN pacman -Syu --noconfirm RUN pacman -Syu --noconfirm
@ -26,7 +23,7 @@ RUN pacman -S --noconfirm python-matplotlib
## Triskele ## Triskele
RUN git clone https://git.normalized.xyz/Florent/Triskele.git \ RUN git clone https://git.normalized.xyz/Florent/Triskele.git \
&& cd Triskele \ && cd Triskele \
&& make -f MakefileNoOTB apGenerator \ && make -f MakefileNoOTB apGenerator -j 8\
&& cd python \ && cd python \
&& pip install -e . && pip install -e .
@ -37,4 +34,7 @@ RUN git clone https://git.normalized.xyz/Florent/LD2DAPs.git \
RUN mkdir Enrichment Data RUN mkdir Enrichment Data
## Minigrida scripts
ADD . /app
CMD ["python", "supervisor.py"] CMD ["python", "supervisor.py"]

View File

@ -4,6 +4,8 @@ services:
minigrida: minigrida:
build: . build: .
image: metropolis:5000/minigrida image: metropolis:5000/minigrida
environment:
- HOST
volumes: volumes:
- enrichment:/app/Enrichment - enrichment:/app/Enrichment
- data:/app/Data - data:/app/Data

View File

@ -122,7 +122,7 @@ def run(expe_file):
def create_report(experience, stime=None, etime=None): def create_report(experience, stime=None, etime=None):
expe_report = OrderedDict() expe_report = OrderedDict()
expe_report['supervisor'] = os.uname()[1] expe_report['supervisor'] = os.environ["HOST"]
# Dates # Dates
for datek, timev in zip(('start_date', 'end_date'), (stime, etime)): for datek, timev in zip(('start_date', 'end_date'), (stime, etime)):