Publish your KDeps image to a Docker registry
This guide shows how to push a local Docker image to a registry (e.g., Docker Hub) so you can run it on services like Google Cloud Run or cloud providers that offer GPUs.
Prerequisites
- You have built a local image (example:
kdeps-whois:latest) - You have a Docker Hub account (example namespace:
jjuliano)
1) Log in to Docker Hub
docker loginEnter your Docker Hub username and password (or a personal access token).
2) Tag your local image
Assuming your local image is kdeps-whois:latest:
docker tag kdeps-whois:latest jjuliano/kdeps-whois:latestIf you’re unsure about tags, list images with:
docker images3) Push the image
docker push jjuliano/kdeps-whois:latest4) Verify on Docker Hub
Open your repositories page to verify:
https://hub.docker.com/repositories/<your-username>
Example: https://hub.docker.com/repositories/jjuliano
Optional: Use versioned tags
docker tag kdeps-whois:latest jjuliano/kdeps-whois:v1.0.0
docker push jjuliano/kdeps-whois:v1.0.0GPU notes:
- For NVIDIA GPUs, use the
*_docker-compose-nvidia.yamland ensure NVIDIA drivers/container toolkit are installed. - For AMD GPUs, use the
*_docker-compose-amd.yamlVM images/drivers that expose/dev/kfdand/dev/dri.
Deploy Docker Compose to Google Cloud Run
If you’re part of the Cloud Run Compose (private preview), you can deploy your Docker Compose configuration directly with a single command.
- Rename the generated Compose file to
compose.yaml
# Example generated file: whois_docker-compose-nvidia.yaml
cp whois_docker-compose-nvidia.yaml compose.yaml- Update the image reference to your registry
Edit compose.yaml and change the image: to either Docker Hub or Artifact Registry:
services:
whois-nvidia:
image: jjuliano/kdeps-whois:latest # Docker Hub example
# image: us-central1-docker.pkg.dev/PROJECT_ID/kdeps-repo/kdeps-whois:latest # Artifact Registry example- Deploy using gcloud
gcloud run compose upTips:
- Pick the variant that matches your hardware needs before renaming (CPU, NVIDIA, AMD).
- Keep external volumes (like
ollama,kdeps) defined in the compose file if supported in your preview setup.
Deploy a single container to Cloud Run (normal path)
If you’re not in the Compose private preview, deploy the single container image referenced in your compose file.
- Enable Cloud Run API
gcloud services enable run.googleapis.com- Identify the image from your compose
Open your compose (or generated compose variant) and copy the image: reference you pushed (Docker Hub or Artifact Registry):
services:
whois-cpu:
image: jjuliano/kdeps-whois:latest- Deploy the image to Cloud Run
gcloud run deploy kdeps-whois \
--image=jjuliano/kdeps-whois:latest \
--region=us-central1 \
--platform=managed \
--allow-unauthenticated \
--port=3000 \
--memory=8Gi \
--cpu=2 \
--min-instances=1 \
--timeout=600Notes:
- If your compose exposes both API and Web ports, deploy each as a separate Cloud Run service (one per container) or use the Compose preview to keep them together.