Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publich torchserve nightly & release cpp dev docker images #3023

Merged
merged 3 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions docker/build_upload_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@
f"./build_image.sh -g -cv cu121 -t {organization}/torchserve:latest-gpu",
dry_run,
)
try_and_handle(
f"./build_image.sh -bt dev -cpp -t {organization}/torchserve:latest-cpp-dev-cpu",
dry_run,
)
try_and_handle(
f"./build_image.sh -bt dev -g -cv cu121 -cpp -t {organization}/torchserve:latest-cpp-dev-gpu",
dry_run,
)
try_and_handle(
f"docker tag {organization}/torchserve:latest {organization}/torchserve:latest-cpu",
dry_run,
Expand All @@ -48,13 +56,25 @@
f"docker tag {organization}/torchserve:latest-gpu {organization}/torchserve:{check_ts_version()}-gpu",
dry_run,
)
try_and_handle(
f"docker tag {organization}/torchserve:latest-cpp-dev-cpu {organization}/torchserve:{check_ts_version()}-cpp-dev-cpu",
dry_run,
)
try_and_handle(
f"docker tag {organization}/torchserve:latest-cpp-dev-gpu {organization}/torchserve:{check_ts_version()}-cpp-dev-gpu",
dry_run,
)

for image in [
f"{organization}/torchserve:latest",
f"{organization}/torchserve:latest-cpu",
f"{organization}/torchserve:latest-gpu",
f"{organization}/torchserve:latest-cpp-dev-cpu",
f"{organization}/torchserve:latest-cpp-dev-gpu",
f"{organization}/torchserve:{check_ts_version()}-cpu",
f"{organization}/torchserve:{check_ts_version()}-gpu",
f"{organization}/torchserve:{check_ts_version()}-cpp-dev-cpu",
f"{organization}/torchserve:{check_ts_version()}-cpp-dev-gpu",
]:
try_and_handle(f"docker push {image}", dry_run)

Expand Down
22 changes: 22 additions & 0 deletions docker/docker_nightly.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,29 @@
project = "torchserve-nightly"
cpu_version = f"{project}:cpu-{get_nightly_version()}"
gpu_version = f"{project}:gpu-{get_nightly_version()}"
cpp_dev_cpu_version = f"{project}:cpp-dev-cpu-{get_nightly_version()}"
cpp_dev_gpu_version = f"{project}:cpp-dev-gpu-{get_nightly_version()}"

# Build Nightly images and append the date in the name
try_and_handle(f"./build_image.sh -n -t {organization}/{cpu_version}", dry_run)
try_and_handle(
f"./build_image.sh -g -cv cu121 -n -t {organization}/{gpu_version}",
dry_run,
)
try_and_handle(
f"./build_image.sh -bt dev -cpp -t {organization}/{cpp_dev_cpu_version}",
dry_run,
)
try_and_handle(
f"./build_image.sh -bt dev -g -cv cu121 -cpp -t {organization}/{cpp_dev_gpu_version}",
dry_run,
)

# Push Nightly images to official PyTorch Dockerhub account
try_and_handle(f"docker push {organization}/{cpu_version}", dry_run)
try_and_handle(f"docker push {organization}/{gpu_version}", dry_run)
try_and_handle(f"docker push {organization}/{cpp_dev_cpu_version}", dry_run)
try_and_handle(f"docker push {organization}/{cpp_dev_gpu_version}", dry_run)

# Tag nightly images with latest
try_and_handle(
Expand All @@ -56,10 +68,20 @@
f"docker tag {organization}/{gpu_version} {organization}/{project}:latest-gpu",
dry_run,
)
try_and_handle(
f"docker tag {organization}/{cpp_dev_cpu_version} {organization}/{project}:latest-cpp-dev-cpu",
dry_run,
)
try_and_handle(
f"docker tag {organization}/{cpp_dev_gpu_version} {organization}/{project}:latest-cpp-dev-gpu",
dry_run,
)

# Push images with latest tag
try_and_handle(f"docker push {organization}/{project}:latest-cpu", dry_run)
try_and_handle(f"docker push {organization}/{project}:latest-gpu", dry_run)
try_and_handle(f"docker push {organization}/{project}:latest-cpp-dev-cpu", dry_run)
try_and_handle(f"docker push {organization}/{project}:latest-cpp-dev-gpu", dry_run)

# Cleanup built images
if args.cleanup:
Expand Down
Loading