FROM python:3.7-slim
WORKDIR /code
RUN apt-get update \
    && apt-get --yes --no-install-recommends install \
        python3 python3-dev \
        build-essential cmake \
        portaudio19-dev python3-pyaudio \
    && rm -rf /var/lib/apt/lists/*

RUN pip3 install numpy
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY src/ .
CMD [ "/bin/bash" ]

#CMD [ "python3", "./server.py" ]

#RUN apt-get update && apt-get -y install cron vim
#WORKDIR /app
#COPY crontab /etc/cron.d/crontab
#COPY hello.py /app/hello.py
#RUN chmod 0644 /etc/cron.d/crontab
#RUN /usr/bin/crontab /etc/cron.d/crontab

# run crond as main process of container
#CMD ["cron", "-f"]

# copy the dependencies file to the working directory

# install dependencies

# copy the content of the local src directory to the working directory

# command to run on container start
#CMD [ "python", "./server.py" ]

CMD ["python3"]