You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add local image flag for fast context loading (#2236)
* Add local image flag for fast context loading
* Add a new experimental flag —x-localimage for use
with —x-fastpush
* When activated, the flag uses the .cog tmp
directory as an rsync for the source code without
weights
* It separates the different build steps into
different build contexts
* On run/predict/train/serve it loads the weights
in as volume mounts
* This allows it to not reload the context each
time a small file is changed for weights
* Fix no tmpMount usage
* Potential fix for code scanning alert no. 24: Potentially unsafe quoting
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Will Sackfield <[email protected]>
* Fix lint
* Use . in non local image for copy
* Add back weights copy exclusion from non local images
* Send standard build directory if not local image
* Fix calculating rel dir on relative dir
* Build then predict in int test
* Add fast and local image to predict test
* Use the image name from the config in predict
* Only if we use build fast
* Fix cog predict build on fast build
* Feed docker image in directly
* Use projectDir to fill in weights path
* Put debug in the right position
* Remove -t in cog predict
* Capture output of test and check return code
* Use absolute path for weights manifest
* Use hard links rather than file copies
* Mirror the local directories permissions
* Follow symlink to target
* Make sure directory permissions are aligned
* Fix fast push
* Synchronise directories between different golang
modules
* Use MkdirAll
* Use a set for weight path check
---------
Signed-off-by: Will Sackfield <[email protected]>
Signed-off-by: Will Sackfield <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Copy file name to clipboardExpand all lines: pkg/cli/predict.go
+28-15
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,7 @@ the prediction on that.`,
56
56
addGpusFlag(cmd)
57
57
addSetupTimeoutFlag(cmd)
58
58
addFastFlag(cmd)
59
+
addLocalImage(cmd)
59
60
60
61
cmd.Flags().StringArrayVarP(&inputFlags, "input", "i", []string{}, "Inputs, in the form name=value. if value is prefixed with @, then it is read from a file on disk. E.g. -i [email protected]")
0 commit comments