replicate / replicate/cog

Document how to use `docker cp` to get weights out of a model

Open
#399 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation
Dominant language
Go
Stars
9.5k
Forks
696
Avg merge
7d 19h
Merged PRs (30d)
2

Description

Your model weights are inside the Cog Docker image. This makes it useful as an artifact for versioning and storing model weights.

One could imagine a feature of Cog that could get weights out, but a simple first step might be to document how model authors can do it with docker cp.

For example, here is something I wrote to get the weights out of a model on Replicate:

#!/bin/bash
id=$(docker create r8.im/f90/wave-u-net-pytorch)
docker cp $id:/src/checkpoints ./

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the issue's docker create and docker cp example, then identify the appropriate model-author documentation entry point. Document how to copy the weights directory out of a Cog Docker image, including the container creation and cleanup considerations; done means authors can follow the documented procedure to retrieve their weights.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.