-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
59 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
FROM python:3.9-bullseye as build | ||
|
||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
ENV PYTHONUNBUFFERED 1 | ||
|
||
ARG TARGETOS | ||
ARG TARGETARCH | ||
|
||
WORKDIR /app | ||
|
||
# COPY scripts/* /app/ | ||
COPY ./requirements.txt /tmp/requirements.txt | ||
|
||
RUN apt-get --allow-releaseinfo-change update \ | ||
&& apt-get install -y --no-install-recommends jq chromium chromium-driver tzdata cmake \ | ||
&& ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ | ||
&& dpkg-reconfigure --frontend noninteractive tzdata \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& apt-get clean | ||
|
||
RUN cd /tmp \ | ||
&& python3 -m pip install --upgrade pip | ||
|
||
RUN if [${TARGETARCH} == "arm"]; then \ | ||
cd /tmp \ | ||
&& curl -O -L https://github.com/nknytk/built-onnxruntime-for-raspberrypi-linux/raw/master/wheels/buster/onnxruntime-1.8.1-cp39-cp39-linux_armv7l.whl \ | ||
&& PIP_ROOT_USER_ACTION=ignore pip3 install onnxruntime-1.8.1-cp39-cp39-linux_armv7l.whl \ | ||
&& PIP_ROOT_USER_ACTION=ignore pip3 install cmake==3.14.3; \ | ||
fi | ||
|
||
# RUN if [${TARGETARCH} == "arm64"]; then \ | ||
# cd /tmp \ | ||
# && PIP_ROOT_USER_ACTION=ignore pip3 install onnxruntime==1.8.1; \ | ||
# fi | ||
|
||
RUN cd /tmp \ | ||
&& PIP_ROOT_USER_ACTION=ignore pip install \ | ||
--disable-pip-version-check \ | ||
--no-cache-dir \ | ||
-r requirements-armv7.txt \ | ||
&& rm -rf /tmp/* \ | ||
&& pip cache purge \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& rm -rf /var/log/* | ||
|
||
ENV LANG C.UTF-8 | ||
|
||
CMD ["python"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
numpy~=1.25.1 | ||
opencv-python-headless~=4.5.3 | ||
requests==2.31.0 | ||
selenium~=4.5.0 | ||
schedule==1.1.0 | ||
Pillow~=9.3.0 | ||
undetected_chromedriver==3.4.7 | ||
pymongo~=3.12.0 | ||
python-dotenv |