5

I am doing a project using the PySEAL library. My project is Machine Learning related so I want to use scikit-learn, pandas and numpy libraries. How can I install these libraries so that I can use them in PySEAL docker container's code?

Whittaker
  • 63
  • 1
  • 5

3 Answers3

3

Simply add numpy and scikit-learn to PySEAL's requirements file.

Your final requirements file should be:

pybind11
cppimport
jupyter
numpy
scikit-learn

And run build-docker.sh again.

blackbrandt
  • 2,010
  • 1
  • 15
  • 32
mbrg
  • 498
  • 10
  • 24
2

Within your python project, you can freeze the python packages with pip freeze and then add the following commands to your Dockerfile:

COPY ./requirements.txt /var/code/requirements.txt
WORKDIR /var/code
RUN pip install -r requirements.txt
Justin Rice
  • 1,111
  • 12
  • 13
0

I had the same error in OpenShift 4.6 environment. So i had to update my requirements.txt and run start-build command again

Flask==1.1.1
numpy
pandas
sklearn

Then run the below command in order oc cli to update and rebuild the image and restart the pods

oc start-build my-app --from-dir . --follow
akarahman
  • 235
  • 2
  • 15