Skip to content

Conversation

@andreasjansson
Copy link
Member

@andreasjansson andreasjansson commented Mar 26, 2021

Build logs now just print a high level trace of what's going on, e.g.

$ cog build
INFO[0000] --> Uploading /Users/andreas/r8/cog-examples/hello-world 
INFO[0000] --> Building package...                      
INFO[0000] --> Received model                           
INFO[0000] --> Building cpu image                       
INFO[0002]   * Installing Python prerequisites          
INFO[0002]   * Installing Python 3.8                    
INFO[0002]   * Installing Cog                           
INFO[0002]   * Copying code                             
INFO[0003] Successfully built 288e75031f73              
INFO[0003] --> Testing model                            
INFO[0003] Deploying container no_registry/hello-world:288e75031f73 for target docker-cpu 
INFO[0005] Waiting for model container to become accessible 
INFO[0005] Got successful ping response from container  
INFO[0005] Inference result length: 9, mime type: text/html 
INFO[0005] Inference result length: 9, mime type: text/html 
INFO[0016] --> Inserting into database                  
Successfully built 2894e44e45ad05e2ec43849ecadd29e448ded229

and if something goes wrong it spits out the logs for that specific build step:

$ cog build
INFO[0000] --> Uploading /Users/andreas/r8/cog-examples/hello-world 
INFO[0000] --> Building package...                      
INFO[0000] --> Received model                           
INFO[0000] --> Building cpu image                       
INFO[0002]   * Installing Python 3.8                    
INFO[0002]   * Installing Python prerequisites          
INFO[0002]   * Installing Python packages               
INFO[0005] #9 sha256:1a209009316a45300d4ee523e1d596a3ca4c6fb69a8aa2a0f5713c8a182b9cb8 
INFO[0005] #9 DONE 1.3s                                 
INFO[0005]                                              
INFO[0005] #10 [ 7/13] RUN pip install   asdfasdfadsffdsafdsaf==1.1.1.1.1 
INFO[0005] #10 sha256:3970572ce4364565003b3220e1e874c31d430d9f2ffc8c1c94823203fa8db7e5 
INFO[0005] #10 1.352 ERROR: Could not find a version that satisfies the requirement asdfasdfadsffdsafdsaf==1.1.1.1.1 (from versions: none) 
INFO[0005] #10 1.352 ERROR: No matching distribution found for asdfasdfadsffdsafdsaf==1.1.1.1.1 
INFO[0005] #10 1.530 WARNING: You are using pip version 20.2.3; however, version 21.0.1 is available. 
INFO[0005] #10 1.530 You should consider upgrading via the '/root/.pyenv/versions/3.8.8/bin/python3.8 -m pip install --upgrade pip' command. 
INFO[0005] #10 ERROR: executor failed running [/bin/sh -c pip install   asdfasdfadsffdsafdsaf==1.1.1.1.1]: exit code: 1 
INFO[0005] ------                                       
INFO[0005]  > [ 7/13] RUN pip install   asdfasdfadsffdsafdsaf==1.1.1.1.1: 
INFO[0005] ------                                       
INFO[0005] executor failed running [/bin/sh -c pip install   asdfasdfadsffdsafdsaf==1.1.1.1.1]: exit code: 1 
Error: Error: Failed to build Docker image: exit status 1
Usage:
  cog build [flags]

Flags:
  -h, --help          help for build
  -r, --repo string   Remote repository, e.g. andreas/jazz-composer (for replicate.ai), or replicate.my-company.net/andreas/jazz-composer

Global Flags:
  -v, --verbose   Verbose output

FATA[0005] Error: Failed to build Docker image: exit status 1 

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

Successfully merging this pull request may close these issues.

2 participants