You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/08/02 15:50:02 UTC

[jira] [Work logged] (BEAM-4833) Add support for users specifying a requirements.txt for their Python portable container

     [ https://issues.apache.org/jira/browse/BEAM-4833?focusedWorklogId=130295&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-130295 ]

ASF GitHub Bot logged work on BEAM-4833:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 02/Aug/18 15:49
            Start Date: 02/Aug/18 15:49
    Worklog Time Spent: 10m 
      Work Description: aaltay commented on a change in pull request #6005: [BEAM-4833] Add support for user req.txt for portable python
URL: https://github.com/apache/beam/pull/6005#discussion_r207277919
 
 

 ##########
 File path: sdks/CONTAINERS.md
 ##########
 @@ -118,6 +118,24 @@ version, you can do so by adding:
 -Pdocker-tag=<tag>
 ```
 
+### Adding dependencies, and making Python go vroom vroom
+
+Not all dependencies are like insurance on used Vespa, if you don't have them some job's just won't run at all and you can't sweet talk your way out of a tensorflow dependency. On the other hand, for Python users dependencies can be automatically installed at run time on each container, which is a great way to find out what your systems timeout limits are. Regardless as to if you have dependency which isn't being installed for you and you need, or you just don't want to install tensorflow 1.6.0 every time you start a new worker this can help.
+
+For Python we have a sample Dockerfile which will take the user specified requirements and install them on top of your base image. If your building from source follow the directions above, otherwise you can set the environment variable BASE_PYTHON_CONTAINER_IMAGE to the desired released version.
+
+```
+USER_REQUIREMENTS=~/my_req.txt ./sdks/python/scripts/add_requirements.sh
+```
+
+Once your custom container is built, remember to upload it to the registry of your choice.
+
+If you build a custom container when you run your job you will want to specify instead of the default latest container, so for example Holden would specify:
 
 Review comment:
   Consider changing `you will want to` to `you will need to`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 130295)
    Time Spent: 1h 50m  (was: 1h 40m)

> Add support for users specifying a requirements.txt for their Python portable container
> ---------------------------------------------------------------------------------------
>
>                 Key: BEAM-4833
>                 URL: https://issues.apache.org/jira/browse/BEAM-4833
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-py-core
>            Reporter: holdenk
>            Assignee: holdenk
>            Priority: Minor
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> It's pretty common that Python scripts require extra dependencies, even the tensorflow model analysis TFMA example requires a different version of TF than the one we install by default. While users can roll their own container or edit the Dockerfile, it would probably be useful to provide an easier path to integrating their dependencies.
> While we support automatically installing the dependencies at runtime on the workers, this can be very slow, especially for things like tensorflow, arrow, or other numeric heavy code.
> Another alternative could be a simple script to augment the existing base image.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)