Skip to content

Commit

Permalink
update docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
ad-astra-video committed Jun 20, 2022
1 parent c6379c8 commit 6493df7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,21 @@ jobs:

- name: Build Linux specific builder container
run: |
docker pull livepeerci/build-platform:latest || echo 'no pre-existing cache found'
docker build -t livepeerci/build-platform:latest --cache-from=livepeerci/build-platform:latest -f docker/Dockerfile.build-linux .
docker push livepeerci/build-platform:latest
docker pull 0xb79orch/build-livepeer:latest || echo 'no pre-existing cache found'
docker build -t 0xb79orch/build-livepeer:latest --cache-from=0xb79orch/build-livepeer:latest -f docker/Dockerfile.build-linux .
docker push 0xb79orch/build-livepeer:latest
- name: Build livepeer in a container shared between Linux and Windows
run: |
docker pull livepeerci/build:latest || echo 'no pre-existing cache found'
./ci_env.sh docker build --build-arg BUILD_TAGS -t livepeerci/build:latest --cache-from=livepeerci/build:latest -f docker/Dockerfile.build .
docker push livepeerci/build:latest
docker pull 0xb79orch/livepeer:latest || echo 'no pre-existing cache found'
./ci_env.sh docker build --build-arg BUILD_TAGS -t 0xb79orch/livepeer:latest --cache-from=0xb79orch/livepeer:latest -f docker/Dockerfile.build .
docker push 0xb79orch/livepeer:latest
- name: Build minimal livepeer distributable
run: |
set -euo pipefail
# We publish two tags for each build:
# livepeer/go-livepeer:BRANCH_NAME and livepeer/go-livepeer:VERSION_STRING. Both are useful
# 0xb79orch/go-livepeer:BRANCH_NAME and 0xb79orch/go-livepeer:VERSION_STRING. Both are useful
# to pull from in different contexts.
# Our Docker tag name should be our branch name with just alphanums
BRANCH_TAG="$(echo $GHA_REF | sed -e 's:refs/heads/::; s:/:-:g' | tr -cd '[:alnum:]_-')"
Expand All @@ -57,11 +57,11 @@ jobs:
LATEST_TAG=""
if [[ "$GITHUB_REF_NAME" == "master" ]]; then LATEST_TAG="latest"; fi
for TAG in $BRANCH_TAG $VERSION_TAG $LATEST_TAG; do
docker tag current-build livepeer/go-livepeer:${TAG}-linux
docker push livepeer/go-livepeer:${TAG}-linux
docker tag current-build 0xb79orch/go-livepeer:${TAG}-linux
docker push 0xb79orch/go-livepeer:${TAG}-linux
# Manifest step is optional in case the Windows build hasn't finished yet
docker manifest create livepeer/go-livepeer:${TAG} livepeer/go-livepeer:${TAG}-linux livepeer/go-livepeer:${TAG}-windows || true
docker manifest push livepeer/go-livepeer:${TAG} || true
docker manifest create 0xb79orch/go-livepeer:${TAG} 0xb79orch/go-livepeer:${TAG}-linux 0xb79orch/go-livepeer:${TAG}-windows || true
docker manifest push 0xb79orch/go-livepeer:${TAG} || true
done
env:
GHA_REF: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref }}
2 changes: 1 addition & 1 deletion docker/Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Don't mess with WORKDIR if you can avoid it, as it's different on Windows/Linux. Use relative
# paths instead.

FROM livepeerci/build-platform:latest
FROM 0xb79orch/livepeer:latest

ARG BUILD_TAGS
ENV BUILD_TAGS ${BUILD_TAGS}
Expand Down
16 changes: 8 additions & 8 deletions docker/Dockerfile.release-linux
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ ENTRYPOINT ["/usr/bin/livepeer"]
# this is needed to access GPU inside Docker Swarm
ENV NVIDIA_DRIVER_CAPABILITIES=all

COPY --from=livepeerci/build:latest /build/livepeer /usr/bin/livepeer
COPY --from=livepeerci/build:latest /build/livepeer_cli /usr/bin/livepeer_cli
COPY --from=livepeerci/build:latest /build/livepeer_bench /usr/bin/livepeer_bench
COPY --from=livepeerci/build:latest /build/livepeer_router /usr/bin/livepeer_router
COPY --from=livepeerci/build:latest /usr/bin/grpc_health_probe /usr/bin/grpc_health_probe
COPY --from=0xb79orch/livepeer:latest /build/livepeer /usr/bin/livepeer
COPY --from=0xb79orch/livepeer:latest /build/livepeer_cli /usr/bin/livepeer_cli
COPY --from=0xb79orch/livepeer:latest /build/livepeer_bench /usr/bin/livepeer_bench
COPY --from=0xb79orch/livepeer:latest /build/livepeer_router /usr/bin/livepeer_router
COPY --from=0xb79orch/livepeer:latest /usr/bin/grpc_health_probe /usr/bin/grpc_health_probe

COPY --from=livepeerci/build:latest /build/tasmodel.pb /tasmodel.pb
COPY --from=0xb79orch/livepeer:latest /build/tasmodel.pb /tasmodel.pb

COPY --from=livepeerci/build:latest /usr/share/misc/pci.ids /usr/share/misc/pci.ids
COPY --from=0xb79orch/livepeer:latest /usr/share/misc/pci.ids /usr/share/misc/pci.ids

# libtensorflow shared libraries are in /usr/local
COPY --from=livepeerci/build:latest /usr/local /usr/local
COPY --from=0xb79orch/livepeer:latest /usr/local /usr/local
# Configure linker
RUN ldconfig

0 comments on commit 6493df7

Please sign in to comment.