-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (22 loc) · 879 Bytes
/
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
# Use an official Python runtime as a parent image
FROM python:3.9.13-slim
# Added new to keep image smaller
RUN apt-get update && apt-get install -y git python3-dev gcc \
&& rm -rf /var/lib/apt/lists/*
RUN pip install pipenv
# Set the working directory in the container
WORKDIR /usr/src/app
# Copy the dependencies file to the working directory
COPY ["Pipfile", "Pipfile.lock", "./"]
RUN pipenv install --system --deploy
# Copy the current directory contents into the container at /usr/src/app
COPY ["predict.py", "MobileNetv2.tflite", "./"]
COPY ["templates", "./templates"]
COPY ["static", "./static"]
# Make port 5000 available to the world outside this container
EXPOSE 5000
# Define environment variable
ENV NAME Weather
# Run predict.py when the container launches
# CMD ["python", "predict.py"]
ENTRYPOINT ["gunicorn", "--bind=0.0.0.0:5000", "predict:app"]