No | Scenario | Description |
---|---|---|
1 | Deploy the Cog-based images directly on SaladCloud | Run the images without any modifications. If a load balancer is in place for inbound traffic, override the ENTRYPOINT and CMD settings of the images by using SaladCloud Portal or APIs, and configure the Cog HTTP prediction server to use IPv6 before starting the server. |
2 | Build a wrapper image for SaladCloud based on an existing Cog-based image | Create a new Dockerfile without needing to modify the original dockerfile. Introduce new features and incorporate IPv6 support if applications need to process inbound traffic through a load balancer. |
3 | Build an image using Cog HTTP prediction server for SaladCloud | Use only the Cog HTTP prediction server without its CLI tools. Directly work with the Dockerfile for flexible and precise control over the construction of the image. |
4 | Build an image using both Cog CLI tools and HTTP prediction server for SaladCloud | Use Cog CLI tools and the cog.yaml file to manage the Dockerfile and image. |
Scenario 1: Deploy the Cog-based images directly on SaladCloud
All Cog-based images can directly run on SaladCloud without any modifications, and you can leverage a load balancer or a job queue along with Cloud Storage for input and output. To receive inbound traffic through a load balancer, containers running on SaladCloud need to listen on an IPv6 port. However, the Cog HTTP prediction server currently only uses IPv4 that cannot be configured via an environment variable. This issue can be easily addressed by executing an additional command when running an image on SaladCloud. Let’s take the BLIP and Whisper images, built by Replicate, as examples and walk through the steps to run these Cog-based images on SaladCloud. First, run the BLIP image locally to verify the location of the site-packages directory and check the source code of Cog HTTP predict server:



