minimaxir / gpt-2-cloud-run

Text-generation API via GPT-2 for Cloud Run

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cloud Build workflow could be less janky

minimaxir opened this issue · comments

Copying an entire GCS bucket / creating a new bucket just for copying it is not ideal. Uploading app.py and the Dockerfile to the same bucket is also somewhat janky.

Possible alternate workflow:

  • Copy only the specified checkpoint folder to the Cloud Build /workspace working directory
  • If the specified checkpoint folder is not named correctly, rename it. This allows multiple folders in a bucket.
  • Upload app.py, Dockerfile, and friends from the local machine with the build CLI command

It may be helpful to include sanity checking steps as well if doing this workflow to check for the presence of filed before the Docker build.