This is an automated email from the ASF dual-hosted git repository.

rabbah pushed a commit to branch fix-compile-script
in repository https://gitbox.apache.org/repos/asf/openwhisk-runtime-python.git

commit bb759a6ce2f622ed1c8baa454f37de416e70de8b
Author: Michele Sciabarra <[email protected]>
AuthorDate: Thu Apr 2 19:39:39 2020 +0200

    Install packages.
    
    Persistent torchvision.
    Add spacy v2.2.4.
    Add google storage.
---
 core/python3Action/Dockerfile                       | 13 ++-----------
 .../requirements.txt                                | 21 +--------------------
 core/python3ActionLoop/Dockerfile                   | 13 ++-----------
 .../requirements.txt                                | 21 +--------------------
 core/python3AiActionLoop/Dockerfile                 |  7 ++++++-
 core/python3AiActionLoop/requirements.txt           |  2 ++
 6 files changed, 14 insertions(+), 63 deletions(-)

diff --git a/core/python3Action/Dockerfile b/core/python3Action/Dockerfile
index 4ac8cc2..d66e094 100644
--- a/core/python3Action/Dockerfile
+++ b/core/python3Action/Dockerfile
@@ -29,17 +29,8 @@ RUN apk add --no-cache \
         openssl-dev
 
 # Install common modules for python
-RUN pip install \
-    beautifulsoup4==4.6.3 \
-    httplib2==0.11.3 \
-    kafka_python==1.4.3 \
-    lxml==4.2.5 \
-    python-dateutil==2.7.3 \
-    requests==2.19.1 \
-    scrapy==1.5.1 \
-    simplejson==3.16.0 \
-    virtualenv==16.0.0 \
-    twisted==18.7.0
+COPY requirements.txt requirements.txt
+RUN pip install --no-cache-dir -r requirements.txt
 
 ENV FLASK_PROXY_PORT 8080
 
diff --git a/core/python3AiActionLoop/requirements.txt 
b/core/python3Action/requirements.txt
similarity index 61%
copy from core/python3AiActionLoop/requirements.txt
copy to core/python3Action/requirements.txt
index 44e5a9b..313606c 100644
--- a/core/python3AiActionLoop/requirements.txt
+++ b/core/python3Action/requirements.txt
@@ -13,26 +13,7 @@ netifaces == 0.10.9
 
 # package to sync from a variety of cloud blob storage
 python-rclone == 0.0.2
-
-# more ML/DL packages
-keras == 2.3.1
-opencv-contrib-python == 4.2.0.32
-Cython == 0.29.14
-tools == 0.1.9
-scikit-image == 0.16.2
-
-nltk == 3.4.5
-
-PyJWT == 1.7.1
-
-# packages for numerics
-numpy == 1.18.1
-scikit-learn == 0.22.1
-scipy == 1.4.1
-pandas == 1.0.1
-
-# packages for image processing
-Pillow == 7.0.0
+google-cloud-storage == 1.28.1
 
 # Etc
 pymongo == 3.10.1
diff --git a/core/python3ActionLoop/Dockerfile 
b/core/python3ActionLoop/Dockerfile
index dfc799e..ca750aa 100644
--- a/core/python3ActionLoop/Dockerfile
+++ b/core/python3ActionLoop/Dockerfile
@@ -37,17 +37,8 @@ FROM python:3.7-buster
 ARG GO_PROXY_BUILD_FROM=source
 
 # Install common modules for python
-RUN pip install \
-    beautifulsoup4==4.6.3 \
-    httplib2==0.11.3 \
-    kafka_python==1.4.3 \
-    lxml==4.2.5 \
-    python-dateutil==2.7.3 \
-    requests==2.19.1 \
-    scrapy==1.5.1 \
-    simplejson==3.16.0 \
-    virtualenv==16.0.0 \
-    twisted==18.7.0
+COPY requirements.txt requirements.txt
+RUN pip install --no-cache-dir -r requirements.txt
 
 RUN mkdir -p /action
 WORKDIR /
diff --git a/core/python3AiActionLoop/requirements.txt 
b/core/python3ActionLoop/requirements.txt
similarity index 61%
copy from core/python3AiActionLoop/requirements.txt
copy to core/python3ActionLoop/requirements.txt
index 44e5a9b..313606c 100644
--- a/core/python3AiActionLoop/requirements.txt
+++ b/core/python3ActionLoop/requirements.txt
@@ -13,26 +13,7 @@ netifaces == 0.10.9
 
 # package to sync from a variety of cloud blob storage
 python-rclone == 0.0.2
-
-# more ML/DL packages
-keras == 2.3.1
-opencv-contrib-python == 4.2.0.32
-Cython == 0.29.14
-tools == 0.1.9
-scikit-image == 0.16.2
-
-nltk == 3.4.5
-
-PyJWT == 1.7.1
-
-# packages for numerics
-numpy == 1.18.1
-scikit-learn == 0.22.1
-scipy == 1.4.1
-pandas == 1.0.1
-
-# packages for image processing
-Pillow == 7.0.0
+google-cloud-storage == 1.28.1
 
 # Etc
 pymongo == 3.10.1
diff --git a/core/python3AiActionLoop/Dockerfile 
b/core/python3AiActionLoop/Dockerfile
index d7d0a96..b78556a 100644
--- a/core/python3AiActionLoop/Dockerfile
+++ b/core/python3AiActionLoop/Dockerfile
@@ -53,7 +53,12 @@ RUN apt-get update && apt-get upgrade -y && apt-get install 
-y \
             && rm -rf /var/lib/apt/lists/*
 
 # PyTorch
-RUN pip3 install torch torchvision
+#RUN pip3 install torch torchvision
+# persistent as it fails often
+RUN while ! pip list | grep torch ;\
+    do pip install torch ; done ;\
+    while ! pip list | grep torchvision ;\
+    do pip install torchvision ; done
 
 # rclone
 RUN curl -L https://downloads.rclone.org/rclone-current-linux-amd64.deb -o 
rclone.deb \
diff --git a/core/python3AiActionLoop/requirements.txt 
b/core/python3AiActionLoop/requirements.txt
index 44e5a9b..8608402 100644
--- a/core/python3AiActionLoop/requirements.txt
+++ b/core/python3AiActionLoop/requirements.txt
@@ -30,6 +30,7 @@ numpy == 1.18.1
 scikit-learn == 0.22.1
 scipy == 1.4.1
 pandas == 1.0.1
+spacy == 2.2.4
 
 # packages for image processing
 Pillow == 7.0.0
@@ -37,6 +38,7 @@ Pillow == 7.0.0
 # Etc
 pymongo == 3.10.1
 redis == 3.4.1
+google-cloud-storage == 1.28.1
 pika == 1.1.0
 elasticsearch == 7.5.1
 cassandra-driver == 3.21.0

Reply via email to