Skip to content

Commit

Permalink
Merge pull request apache#10 from aljoscha/hacking-job-server
Browse files Browse the repository at this point in the history
Fix python harness image creation
  • Loading branch information
axelmagn authored Mar 13, 2018
2 parents 24dff20 + 826fab5 commit a8fca8c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
8 changes: 3 additions & 5 deletions sdks/python/container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,9 @@ RUN \
# Check that the fast implementation of protobuf is used.
python -c "from google.protobuf.internal import api_implementation; assert api_implementation._default_implementation_type == 'cpp'; print 'Verified fast protobuf used.'"

ADD target/apache-beam.tar.gz /opt/apache/beam/tars/

RUN \
cd /opt/apache/beam/tars/* && \
python setup.py install
COPY target/apache-beam.tar.gz /opt/apache/beam/tars/
RUN pip install /opt/apache/beam/tars/apache-beam.tar.gz[gcp] && \
rm /opt/apache/beam/tars/apache-beam.tar.gz

ADD target/linux_amd64/boot /opt/apache/beam/

Expand Down
8 changes: 4 additions & 4 deletions sdks/python/container/boot.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,16 @@ func main() {

dir := filepath.Join(*semiPersistDir, "staged")

files, err := artifact.Materialize(ctx, *artifactEndpoint, dir)
_, err = artifact.Materialize(ctx, *artifactEndpoint, dir)
if err != nil {
log.Fatalf("Failed to retrieve staged files: %v", err)
}

// TODO(herohde): the packages to install should be specified explicitly. It
// would also be possible to install the SDK in the Dockerfile.
if setupErr := installSetupPackages(files, dir); setupErr != nil {
log.Fatalf("Failed to install SDK: %v", setupErr)
}
// if setupErr := installSetupPackages(files, dir); setupErr != nil {
// log.Fatalf("Failed to install SDK: %v", setupErr)
// }

// (3) Invoke python

Expand Down
3 changes: 1 addition & 2 deletions sdks/python/container/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ dependencies {

task copyDockerfileDependencies(type: Copy) {
from configurations.dockerDependency
// rename "apache-beam.*\\.tar.gz", "apache-beam.tar.gz"
rename "apache-beam-2.5.0.dev0.tar.gz", "apache-beam.tar.gz"
rename "apache-beam.*\\.tar.gz", "apache-beam.tar.gz"
into "build/target"
}

Expand Down

0 comments on commit a8fca8c

Please sign in to comment.