Pushing the image to the registry
After you add your libraries to the Dockerfile and create the image, you must push the Watson Machine Learning image to the registry.
-
Upload your image to the target registry, for example the registry on the Cloud Pak for Data cluster. The value of
<target_registry>
is the private registry that is configured for Cloud Pak for Data.You can upload by using Docker, Podman, or Skopeo.
-
For Docker:
docker login -u <username> -p <password> <target_registry> docker tag <new-image-name> <target_registry>/<new-image-name>:<new-image-tag> docker push <target_registry>/<new-image-name>:<new-image-tag>
-
For Podman:
podman login -u <username> -p <password> <target_registry> podman tag <new-image-name> <target_registry>/<new-image-name>:<new-image-tag> podman push <target_registry>/<new-image-name>:<new-image-tag>
-
For Skopeo: You don't need a separate login command for Skopeo but Skopeo needs to know whether you used
Docker
orBuildah
to build the new image. Depending on the build engine, the location for images changes locally.If the image was built with Docker:
skopeo copy –dest-creds <username>:<password> docker-daemon:<new-image-name> docker://<target_registry>/<new-image-name>:<new-image-tag>
If the image was built with Buildah:
skopeo copy –dest-creds <username>:<password> container-storage:<new-image-name> docker://<target_registry>/<new-image-name>:<new-image-tag>
Notes:
- Watson Machine Learning custom images support images from a private container registry only.
- A CPD cluster pulls images directly from the IBM® Entitled Registry or from a private Container Registry. For more information, see Configuring your cluster to pull images.
Next steps
Creating a base software specification for the custom image
Parent topic: Customizing deployment runtime images