Skip to content

Commit

Permalink
Working automated Docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
minimaxir committed Sep 29, 2017
1 parent 3124086 commit f355d5e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
@@ -0,0 +1,3 @@
*
!*.py
!cards.csv
22 changes: 22 additions & 0 deletions Dockerfile
@@ -0,0 +1,22 @@
FROM phusion/baseimage:0.9.22

# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]

# https://stackoverflow.com/a/44958097
# Create the log file to be able to run tail
RUN apt-get -y update && apt-get -y install python3-dev python3-pip libav-tools imagemagick libopencv-dev python-opencv

RUN pip3 install --upgrade pip
RUN pip3 --no-cache-dir install imageio numpy scipy matplotlib sympy nose decorator tqdm pillow pytest twython moviepy
RUN python3 -c "import imageio; imageio.plugins.ffmpeg.download()"

COPY . /

# Setup cron job
RUN (crontab -l; echo "* * * * * ls; cd / && python3 /mtgifening.py >> /dev/pts/0 2>&1") | crontab


# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENTRYPOINT /sbin/my_init

0 comments on commit f355d5e

Please sign in to comment.