zionrubin commented on a change in pull request #59:
URL: https://github.com/apache/incubator-liminal/pull/59#discussion_r676626780



##########
File path: liminal/build/image/spark/spark.py
##########
@@ -0,0 +1,45 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+import os
+
+from liminal.build.python import BasePythonImageBuilder
+
+
+class SparkImageBuilder(BasePythonImageBuilder):
+    def __init__(self, config, base_path, relative_source_path, tag):
+        super().__init__(config, base_path, relative_source_path, tag)
+
+    @staticmethod
+    def _dockerfile_path():
+        return os.path.join(os.path.dirname(__file__), 'Dockerfile')
+
+    def _additional_files_from_filename_content_pairs(self):
+        with open(self._dockerfile_path()) as original:
+            data = original.read()
+
+        data = self.__add_pip_install(data)
+        data = self._mount_pip_conf(data)
+
+        return [('Dockerfile', data)]
+
+    @staticmethod
+    def __add_pip_install(data):
+        new_data = data
+        new_data = new_data.replace('{{INSTALL_COMMANDS}}',

Review comment:
       I think you asked for it to do it in the code instead of in the docker 
file. I think that it shouldn't be in the docker file because we can't assume 
there that sparkImageBuilder extends PythonImageBuilder that sparkImageBuilder 
extends PythonImageBuilder. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to