File tree Expand file tree Collapse file tree 2 files changed +34
-22
lines changed Expand file tree Collapse file tree 2 files changed +34
-22
lines changed Original file line number Diff line number Diff line change 1
- FROM tiangolo/uvicorn-gunicorn:python3.6 AS uvicorn-builder
1
+ FROM tiangolo/uvicorn-gunicorn:python3.9 AS uvicorn-builder
2
2
FROM openvino/ubuntu18_runtime:2021.4
3
3
4
4
USER root
5
5
6
- # Copy scripts form uvicorn-builder (this is the only purpose of the uvicorn-builder build stage)
6
+ # Log start of copying scripts
7
7
COPY --from=uvicorn-builder /start.sh /start.sh
8
8
COPY --from=uvicorn-builder /start-reload.sh /start-reload.sh
9
9
10
10
# Update pip
11
- ENV DEBIAN_FRONTEND noninteractive
11
+ ENV DEBIAN_FRONTEND= noninteractive
12
12
RUN python3 -m pip install --upgrade pip
13
13
14
- # Install dependencies
14
+ # Install build tools and OpenCV dependencies
15
+ RUN apt-get update && apt-get install -y \
16
+ build-essential \
17
+ cmake \
18
+ ninja-build \
19
+ pkg-config \
20
+ libgl1-mesa-glx \
21
+ libglib2.0-0
22
+
23
+ # Log the installation of Python dependencies
15
24
COPY requirements.txt requirements.txt
16
25
RUN python3 -m pip install -U -r requirements.txt
17
26
18
- # Configure webserver settings
19
- ENV HOST 0.0.0.0
20
- ENV PORT 80
21
- ENV WORKERS_PER_CORE 1
22
- ENV WEB_CONCURRENCY 1
23
- ENV LOG_LEVEL debug
27
+ ENV HOST=0.0.0.0
28
+ ENV PORT=80
29
+ ENV WORKERS_PER_CORE=1
30
+ ENV WEB_CONCURRENCY=1
31
+ ENV LOG_LEVEL=debug
32
+ ENV ACCESS_LOG=True
33
+ ENV ERROR_LOG=True
24
34
25
35
EXPOSE 80
26
36
37
+ # Log the copying of application files
27
38
COPY src/main /app
28
39
WORKDIR /app
29
40
30
- # Setup OpenVINO environment vars before starting
41
+ # Setup OpenVINO and start the app
31
42
CMD source /opt/intel/openvino/bin/setupvars.sh && \
32
- /start.sh
43
+ echo "OpenVINO environment setup completed." && \
44
+ /start.sh --log-level debug --access-log
Original file line number Diff line number Diff line change 1
- aiofiles
2
- celery
3
- fastapi
4
- numpy
5
- opencv-python >= 4.0 .0.0
6
- python-multipart
7
- Pillow
8
- python-socketio
9
- requests
1
+ aiofiles == 0.8.0
2
+ celery == 5.1.2 # Updated to a valid version
3
+ fastapi == 0.83.0
4
+ numpy == 1.19.5
5
+ opencv-python >= 4.10 .0.84
6
+ python-multipart == 0.0.5
7
+ Pillow == 8.4.0
8
+ python-socketio == 5.11.0
9
+ requests == 2.27.1
10
10
uvicorn == 0.11.5
11
11
gunicorn == 20.0.4
12
- jsonschema
12
+ jsonschema == 4.0.0
You can’t perform that action at this time.
0 commit comments