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

Cog Push Error: This image doesn't look like it was built with Cog. #1654

Open
kiradeva opened this issue May 10, 2024 · 0 comments
Open

Cog Push Error: This image doesn't look like it was built with Cog. #1654

kiradeva opened this issue May 10, 2024 · 0 comments
Assignees

Comments

@kiradeva
Copy link

When using cog to push to repilcate we are getting the following error: This image doesn't look like it was built with Cog. You can only push images built with Cog to Replicate: https://github.com/replicate/cog

Here is the github actions that we are using:

name: cog-build-deploy

on:
  workflow_call:
    inputs:
      folder:
        required: true
        type: string
        description: "Path to the model folder"
      model_name:
        required: true
        type: string
        description: "Name of the model to deploy"
      gpu:
        required: false
        type: boolean
        description: "Set to true if your model requires a GPU"
        default: false

    secrets:
        REPLICATE_TOKEN:
          required: true


jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Free Disk Space (Ubuntu)
        uses: jlumbroso/free-disk-space@main
        with:
          tool-cache: false
          android: true
          dotnet: true
          haskell: true
          large-packages: true
          docker-images: true
          swap-storage: true

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3

      - name: Check out code
        uses: actions/checkout@v4

      - name: Setup Cog
        uses: replicate/setup-cog@v1.0.5
        with:
          token: ${{ secrets.REPLICATE_TOKEN }}
          install-cuda: ${{ inputs.gpu }}
          cog-version: v0.9.7


      - name: Download weights
        working-directory: ${{ inputs.folder }}
        run: |
          echo ${{ secrets.REPLICATE_TOKEN }} | cog login --token-stdin
          chmod +x script/download_weights
          cog run script/download_weights

      - name: Push to Replicate
        working-directory: ${{ inputs.folder }}
        env:
          REPLICATE_API_TOKEN: ${{ secrets.REPLICATE_TOKEN }}
        run: |
          echo ${{ secrets.REPLICATE_TOKEN }} | cog login --token-stdin
          cog push r8.im/my-org/${{ inputs.model_name }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants