title: Using numpy from the host OS for a spark container
body: <p>I want to use the Docker image with Apache Spark on Ubuntu 18.04.</p>
  
  <p>The more popular image from the hub has <a href="https://hub.docker.com/r/sequenceiq/spark" rel="nofollow noreferrer">Spark 1.6</a>. 
  The second image has a more recent version <a href="https://hub.docker.com/r/p7hb/docker-spark/" rel="nofollow noreferrer">Spark 2.2</a></p>
  
  <p>No image has numpy installed. The basic examples for Spark <a href="https://spark.apache.org/docs/latest/ml-statistics.html" rel="nofollow noreferrer">MLlib main guide</a> require it.</p>
  
  <p>I've tried running Dockerfile for installing numpy unsuccessfully, adding this to the original Dockerfile for Spark 2.2 image: </p>
  
  <pre><code>RUN apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose
  </code></pre>
  
  <p>How do you set the container to use the OS's numpy installation? What is the procedure? Is this the correct direction at all? </p>
  
  <p>Edit: OS is Ubuntu 18.04</p>