forked from danngalann/bulk-blur-detection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
43 lines (33 loc) · 1.14 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
# Use an official Python runtime as a parent image
FROM python:3.9-slim
# Set the working directory in the container
WORKDIR /app
# Install necessary dependencies for OpenCV and Git
RUN apt-get update && \
apt-get install -y \
git \
libgl1-mesa-glx \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender1 && \
rm -rf /var/lib/apt/lists/*
# Clone the repository
RUN git clone `--single-branch` https://github.com/jacobm85/bulk-blur-detection.git .
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install flask flask-socketio eventlet scikit-image
# Install TensorFlow (for model loading)
#RUN pip install --no-cache-dir tensorflow-cpu # 'tensorflow' or 'tensorflow-cpu' for CPU version
# Copy all the local files into the /app directory
COPY . /app
# Copy the index.html file
COPY templates/index.html /app/templates/index.html
# Copy the web app code
COPY app.py /app/app.py
# Copy the detector code
COPY process_blurry_images.py /app/process_blurry_images.py
# Expose the port the app runs on
EXPOSE 5000
# Command to run the application
CMD ["python", "app.py"]