cancel
Showing results for 
Search instead for 
Did you mean: 

Import sapdi in python operator with existing docker image

0 Kudos

Hello Community,

I already have one docker file grouped to the python operator. I have tried creating a new docker file for sapdi as mentioned in one of the questions but it's not working.

Docker File 1:

# Use an official Python 3.6 image as a parent image 
FROM python:3.6
# Install python libraries
RUN pip install pandas
RUN pip install numpy
RUN pip install sklearn
RUN pip install catboost
RUN pip install pgeocode
RUN pip install hdfs==2.5.0
RUN pip install tornado==5.0.2
# Add vflow user and vflow group to prevent error 
# container has runAsNonRoot and image will run as root
RUN groupadd -g 1972 vflow && useradd -g 1972 -u 1972 -m vflow
USER 1972:1972
WORKDIR /home/vflow
ENV HOME=/home/vflow
Tags for this Docker file:
{
    "python36": "",
    "tornado": "5.0.2",
    "hdfs": "2.5.0",
    "module": ""
}

Docker File 2:

https://answers.sap.com/questions/13285803/import-sapdi-library-in-python-operator-of-sap-di.html

Have used this to build second docker file for sapdi.

Then have attached both the tags to the python operator, but it's not working.

Any help would be appreciated!

Thank you.

View Entire Topic
AndreasForster
Product and Topic Expert
Product and Topic Expert

Hi Sumit, I have just had a look at the DockerFiles that come with DI and com.sap.dsp.dsp-core-operators has a sapdi tag. It was only a quick test, but with this Docker I was able to import sapdi in a Python operator

FROM $com.sap.dsp.dsp-core-operators
RUN pip3.6 install --user numpy=="1.16.1"
0 Kudos

Thanks Andreas,

This is working fine.