Skip to content

Commit

Permalink
minor fix: Parse out slashes in Docker container name (#2437)
Browse files Browse the repository at this point in the history
  • Loading branch information
gs-olive authored Nov 6, 2023
1 parent a25a512 commit 6f6bec2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/docker_builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Fix Slashes Repo Name
id: fix_slashes
run: |
export container_name=$(echo ${{ env.CONTAINER_NAME }} | sed 's|/|_|g')
echo ::set-output name=container_name::$container_name
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
Expand All @@ -38,7 +44,7 @@ jobs:
# Automatically detect TensorRT and cuDNN default versions for Torch-TRT build
- name: Build Docker image
env:
DOCKER_TAG: ${{ env.DOCKER_REGISTRY }}/${{ env.CONTAINER_NAME }}
DOCKER_TAG: ${{ env.DOCKER_REGISTRY }}/${{ steps.fix_slashes.outputs.container_name }}
run: |
python3 -m pip install pyyaml
TRT_VERSION=$(python3 -c "import versions; versions.tensorrt_version()")
Expand All @@ -50,7 +56,7 @@ jobs:
- name: Push Docker image
env:
DOCKER_URL: ${{ env.DOCKER_REGISTRY }}/${{ env.CONTAINER_NAME }}
DOCKER_URL: ${{ env.DOCKER_REGISTRY }}/${{ steps.fix_slashes.outputs.container_name }}
run: docker push $DOCKER_URL

# Clean up all untagged containers in registry
Expand Down

0 comments on commit 6f6bec2

Please sign in to comment.