File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y \
5555# PyTorch
5656# persistent as it fails often
5757RUN while ! pip list | grep torch ;\
58- do pip install torch ; done ;\
58+ do pip --no-cache-dir install torch ; done ;\
5959 while ! pip list | grep torchvision ;\
6060 do pip install torchvision ; done
6161
@@ -64,6 +64,7 @@ RUN curl -L https://downloads.rclone.org/rclone-current-linux-amd64.deb -o rclon
6464 && dpkg -i rclone.deb \
6565 && rm rclone.deb
6666
67+ COPY requirements_common.txt requirements_common.txt
6768COPY requirements.txt requirements.txt
6869RUN pip3 install --upgrade pip six wheel &&\
6970 pip3 install --no-cache-dir -r requirements.txt &&\
@@ -89,4 +90,5 @@ ENV OW_EXECUTION_ENV=openwhisk/action-python-v3.6-ai
8990ENV OW_COMPILER=/bin/compile
9091# use utf-8
9192ENV PYTHONIOENCODING=UTF-8
93+
9294ENTRYPOINT ["/bin/proxy" ]
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ apply from: '../../gradle/docker.gradle'
2020
2121distDocker. dependsOn ' copyLib'
2222distDocker. dependsOn ' copyBin'
23+ distDocker. dependsOn ' copyReqrCommon'
2324distDocker. finalizedBy(' cleanup' )
2425
2526task copyLib (type : Copy ) {
@@ -32,7 +33,13 @@ task copyBin(type: Copy) {
3233 into ' ./bin'
3334}
3435
36+ task copyReqrCommon (type : Copy ) {
37+ from ' ../requirements_common.txt'
38+ into ' ./'
39+ }
40+
3541task cleanup (type : Delete ) {
3642 delete ' bin'
3743 delete ' lib'
44+ delete ' requirements_common.txt'
3845}
Original file line number Diff line number Diff line change 1- # default available packages for python3action
2- beautifulsoup4 == 4.8.2
3- httplib2 == 0.17.0
4- kafka_python == 1.4.7
5- lxml == 4.5.0
6- python-dateutil == 2.8.1
7- requests == 2.22.0
8- scrapy == 1.8.0
9- simplejson == 3.17.0
10- virtualenv == 16.7.9
11- twisted == 19.10.0
12- netifaces == 0.10.9
1+ # default packages available for action-python-v3.6-ai
2+ -r requirements_common.txt
133
144# package to sync from a variety of cloud blob storage
155python-rclone == 0.0.2
166
177# more ML/DL packages
18- keras == 2.3.1
19- opencv-contrib-python == 4.2.0.32
20- Cython == 0.29.14
21- tools == 0.1.9
22- scikit-image == 0.16.2
23-
24- nltk == 3.4.5
25-
26- PyJWT == 1.7.1
8+ keras == 2.6.0
9+ opencv-contrib-python == 4.5.3.56
10+ Cython == 0.29.24
11+ tools == 0.1.9
12+ scikit-image == 0.17.2
13+ nltk == 3.6.2
2714
2815# packages for numerics
29- numpy == 1.18.1
30- scikit-learn == 0.22.1
31- scipy == 1.4.1
32- pandas == 1.0.1
16+ numpy == 1.19.5
17+ scikit-learn == 0.24.2
18+ scipy == 1.5.4
19+ pandas == 1.1.5
3320
3421# packages for image processing
35- Pillow == 7.0.0
22+ Pillow == 8.3.2
3623
3724# Etc
38- pymongo == 3.10.1
39- redis == 3.4.1
40- pika == 1.1.0
41- elasticsearch == 7.5.1
42- cassandra-driver == 3.21.0
43- etcd3 == 0.11.1
44- twilio == 6.35.4
25+ PyJWT == 1.7.1
26+ pymongo == 3.12.0
27+ redis == 3.5.3
28+ pika == 1.2.0
29+ elasticsearch == 7.14.1
30+ cassandra-driver == 3.25.0
31+ etcd3 == 0.12.0
32+ twilio == 6.63.2
Original file line number Diff line number Diff line change @@ -39,14 +39,18 @@ FROM python:3.9-buster
3939ARG GO_PROXY_BUILD_FROM=release
4040
4141# Install common modules for python
42+ COPY requirements_common.txt requirements_common.txt
4243COPY requirements.txt requirements.txt
43- RUN pip install --no-cache-dir -r requirements.txt
44+ RUN pip3 install --upgrade pip six wheel &&\
45+ pip3 install --no-cache-dir -r requirements.txt
4446
4547RUN mkdir -p /action
4648WORKDIR /
49+
4750COPY --from=builder_source /bin/proxy /bin/proxy_source
4851COPY --from=builder_release /bin/proxy /bin/proxy_release
4952RUN mv /bin/proxy_${GO_PROXY_BUILD_FROM} /bin/proxy
53+
5054ADD bin/compile /bin/compile
5155ADD lib/launcher.py /lib/launcher.py
5256
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ apply from: '../../gradle/docker.gradle'
2020
2121distDocker. dependsOn ' copyLib'
2222distDocker. dependsOn ' copyBin'
23+ distDocker. dependsOn ' copyReqrCommon'
2324distDocker. finalizedBy(' cleanup' )
2425
2526task copyLib (type : Copy ) {
@@ -32,7 +33,13 @@ task copyBin(type: Copy) {
3233 into ' ./bin'
3334}
3435
36+ task copyReqrCommon (type : Copy ) {
37+ from ' ../requirements_common.txt'
38+ into ' ./'
39+ }
40+
3541task cleanup (type : Delete ) {
3642 delete ' bin'
3743 delete ' lib'
44+ delete ' requirements_common.txt'
3845}
Original file line number Diff line number Diff line change 1- # default available packages for action-python-v39
2- beautifulsoup4 == 4.9.3
3- httplib2 == 0.19.1
4- kafka_python == 1.4.7
5- lxml == 4.6.3
6- python-dateutil == 2.8.1
7- requests == 2.25.1
8- scrapy == 1.8.0
9- simplejson == 3.17.2
10- virtualenv == 20.4.7
11- twisted == 21.2.0
12- netifaces == 0.11.0
1+ # default packages available for action-python-v3.9
2+ -r requirements_common.txt
Original file line number Diff line number Diff line change @@ -39,14 +39,18 @@ FROM python:3.7-buster
3939ARG GO_PROXY_BUILD_FROM=release
4040
4141# Install common modules for python
42+ COPY requirements_common.txt requirements_common.txt
4243COPY requirements.txt requirements.txt
43- RUN pip install --no-cache-dir -r requirements.txt
44+ RUN pip3 install --upgrade pip six wheel &&\
45+ pip3 install --no-cache-dir -r requirements.txt
4446
4547RUN mkdir -p /action
4648WORKDIR /
49+
4750COPY --from=builder_source /bin/proxy /bin/proxy_source
4851COPY --from=builder_release /bin/proxy /bin/proxy_release
4952RUN mv /bin/proxy_${GO_PROXY_BUILD_FROM} /bin/proxy
53+
5054ADD bin/compile /bin/compile
5155ADD lib/launcher.py /lib/launcher.py
5256
Original file line number Diff line number Diff line change 1717
1818ext. dockerImageName = ' action-python-v3.7'
1919apply from : ' ../../gradle/docker.gradle'
20+
21+ distDocker. dependsOn ' copyReqrCommon'
22+ distDocker. finalizedBy(' cleanup' )
23+
24+ task copyReqrCommon (type : Copy ) {
25+ from ' ../requirements_common.txt'
26+ into ' ./'
27+ }
28+
29+ task cleanup (type : Delete ) {
30+ delete ' requirements_common.txt'
31+ }
Original file line number Diff line number Diff line change 1- # default available packages for python3action
2- beautifulsoup4 == 4.6.3
3- httplib2 == 0.11.3
4- kafka_python == 1.4.3
5- lxml == 4.2.5
6- python-dateutil == 2.7.3
7- requests == 2.19.1
8- scrapy == 1.5.1
9- simplejson == 3.16.0
10- virtualenv == 16.0.0
11- twisted == 18.7.0
1+ # default packages available for action-python-v3.7
2+ -r requirements_common.txt
You can’t perform that action at this time.
0 commit comments