You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
FROM python:3.6.13
|
|
|
|
|
|
|
|
COPY ./ /root/poms/model/
|
|
|
|
|
|
|
|
WORKDIR /root/poms/model
|
|
|
|
|
|
|
|
RUN pip install --upgrade pip && pip install -i https://mirrors.aliyun.com/pypi/simple/ -r /root/poms/model/requirements.txt
|
|
|
|
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -y --no-install-recommends cron \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& echo "0 1 * * * root python3 /root/poms/model/main.py >> /root/poms/model/log.txt" >> /etc/crontab
|
|
|
|
|
|
|
|
ENV LC_ALL C.UTF-8
|
|
|
|
CMD PYTHONIOENCODING=utf-8 /etc/init.d/cron start && touch log.txt && tail -f log.txt
|