-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
53 lines (43 loc) · 1.18 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
FROM python:3.8-slim
#later alpine to save even more, but is it worth it?
# Set environment variables to ensure non-interactive apt-get and prevent cache busting
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
gcc \
curl \
zip \
expect \
build-essential \
pkg-config \
libhdf5-dev \
&& rm -rf /var/lib/apt/lists/*
RUN pip install requests \
pycaret \
matplotlib \
pytz \
requests \
geopy \
timezonefinder \
python-dotenv \
xgboost \
catboost \
tensorflow \
scikeras \
scikit-learn \
joblib==1.3 \
keras-tuner
# keras tuner check usage!
COPY . /root/src/
RUN rm -rf /var/lib/apt/lists/* \
&& cd /root/src/ \
&& mkdir -p /var/lib/waziapp \
&& zip /index.zip docker-compose.yml package.json
#----------------------------#
# Uncomment For development
#ENTRYPOINT ["tail", "-f", "/dev/null"]
# Uncomment For production
WORKDIR /root/src/
ENTRYPOINT ["sh", "-c", "unbuffer python main.py 2>&1 | tee -a python_logs.log"]
# Here is how you can access inside your container:
# sudo docker exec -it waziup.irrigation-prediction bash