1
0
mirror of https://github.com/newnius/YAO-Dockerfiles.git synced 2025-06-06 07:51:54 +00:00

add yao-agent

This commit is contained in:
Newnius 2020-05-23 18:29:02 +08:00
parent 51ece01aa9
commit 123a999bbe
4 changed files with 54 additions and 0 deletions

21
yao-agent/dev/Dockerfile Normal file
View File

@ -0,0 +1,21 @@
FROM tensorflow/tensorflow:1.14.0-gpu
MAINTAINER Newnius <newnius.cn@gmail.com>
RUN apt update && \
apt install -y python3 python3-pip && \
rm -rf /var/lib/apt/lists/*
RUN apt update && \
apt install -y git vim httpie && \
rm -rf /var/lib/apt/lists/*
RUN pip3 install docker kafka psutil
RUN git clone https://github.com/newnius/YAO-agennt.git /yao-agent
WORKDIR /yao-agent
ADD bootstrap.sh /etc/
CMD ["/etc/bootstrap.sh"]

6
yao-agent/dev/bootstrap.sh Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
# run nvidia-smi in background to speed up the query and reduce CPU load (why?)
nvidia-smi daemon
python3 /yao-agent/agent.py

21
yao-agent/mock/Dockerfile Normal file
View File

@ -0,0 +1,21 @@
FROM tensorflow/tensorflow:1.14.0-gpu
MAINTAINER Newnius <newnius.cn@gmail.com>
RUN apt update && \
apt install -y python3 python3-pip && \
rm -rf /var/lib/apt/lists/*
RUN apt update && \
apt install -y git vim httpie && \
rm -rf /var/lib/apt/lists/*
RUN pip3 install docker kafka psutil
RUN git clone https://github.com/newnius/YAO-agennt.git /yao-agent
WORKDIR /yao-agent
ADD bootstrap.sh /etc/
CMD ["/etc/bootstrap.sh"]

6
yao-agent/mock/bootstrap.sh Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
# run nvidia-smi in background to speed up the query and reduce CPU load (why?)
nvidia-smi daemon
python3 /yao-agent/mock.py