Skip to content

Commit

Permalink
[Docker] Alias ray-ml:nightly to ray-ml:nightly-gpu (ray-project#…
Browse files Browse the repository at this point in the history
…19726)

* wip

* wip

* update

* finish

* deprecate

* debug

* fix and address comments

* try catch

* fix

* split tests

* force

* merge

* docs

* wip

* fix and check

* update readme

* fix

* fix

* fix sanity checking

* format

* alias

* fix

* comment
  • Loading branch information
amogkam authored Oct 27, 2021
1 parent 1f68198 commit 5d54412
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
13 changes: 13 additions & 0 deletions ci/travis/build-docker-images.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,8 @@ def push_and_tag_images(py_versions: List[str],
tag_mapping[tag].append(tag)

# If no device is specified, it should map to CPU image.
# For ray-ml image, if no device specified, it should map to GPU image.
# There is no CPU image for ray-ml.
# "-gpu" tag should refer to the ML_CUDA_VERSION
for old_tag in tag_mapping.keys():
if "cpu" in old_tag:
Expand All @@ -450,6 +452,13 @@ def push_and_tag_images(py_versions: List[str],
new_str="-gpu")
tag_mapping[old_tag].extend(new_tags)

if image_name == "ray-ml":
new_tags = _create_new_tags(
tag_mapping[old_tag],
old_str=f"-{ML_CUDA_VERSION}",
new_str="")
tag_mapping[old_tag].extend(new_tags)

# No Python version specified should refer to DEFAULT_PYTHON_VERSION
for old_tag in tag_mapping.keys():
if DEFAULT_PYTHON_VERSION in old_tag:
Expand Down Expand Up @@ -487,6 +496,10 @@ def push_and_tag_images(py_versions: List[str],
else:
assert f"{sha_tag}-gpu" in tag_mapping[old_tag]

if image_name == "ray-ml":
assert "nightly" in tag_mapping[old_tag]
assert f"{sha_tag}" in tag_mapping[old_tag]

print(f"These tags will be created for {image_name}: ", tag_mapping)

# Tag and push all images.
Expand Down
2 changes: 1 addition & 1 deletion doc/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ Some tags also have `variants` that add or change functionality:
* - -gpu
- Aliases to a specific ``-cuXX`` tagged image.
* - <no tag>
- Aliases to ``-cpu`` tagged images
- Aliases to ``-cpu`` tagged images. For ``ray-ml`` image, aliases to ``-gpu`` tagged image.


If you want to tweak some aspect of these images and build them locally, refer to the following script:
Expand Down
1 change: 1 addition & 0 deletions docker/ray-ml/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ This image is an extension of the [`rayproject/ray`](https://hub.docker.com/repo

### Suffixes
* `-gpu` - These are based off of an `NVIDIA CUDA` image. They require the [Nvidia Docker Runtime](https://github.com/NVIDIA/nvidia-docker) to be installed on the host for the container to access GPUs.
* Tags without a suffix refer to `-gpu` image

## Other Images
* [`rayproject/ray`](https://hub.docker.com/repository/docker/rayproject/ray) - Ray and all of its dependencies.

0 comments on commit 5d54412

Please sign in to comment.