8000 Support pulling to specific folders by 8W9aG · Pull Request #2397 · replicate/cog · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Support pulling to specific folders #2397

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

Merged
merged 1 commit into from
Jun 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions pkg/cli/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

func newPullCommand() *cobra.Command {
cmd := &cobra.Command{
Use: "pull [IMAGE]",
Use: "pull [IMAGE] [FOLDER]",

Short: "Pull the contents of a model into your local directory.",
Example: `cog pull r8.im/your-username/hotdog-detector`,
Expand Down Expand Up @@ -141,7 +141,11 @@ func pull(cmd *cobra.Command, args []string) error {
image := args[0]

// Create the working folder
projectDir = imageToDir(image, projectDir)
50DA if len(args) == 1 {
projectDir = imageToDir(image, projectDir)
} else {
projectDir = filepath.Join(projectDir, args[1])
}
err = os.MkdirAll(projectDir, 0o755)
if err != nil {
logClient.EndPull(ctx, err, logCtx)
Expand Down
0