cog
cog copied to clipboard
Document `.dockerignore`
trafficstars
At the moment we don't mention that you can use .dockerignore files to exclude files from the Cog-built Docker image. We should document that feature.
(edited by @bfirsh and @andreasjansson)
@charlesfrye mentioned this the other day.
Would it be unwise to have cog init create a .dockerignore file for the user? It could contain popular editor folders, maybe some commented out examples like
# Avoid pushing the user's IDE settings.
.vscode/
.idea/
# Prevent accidental key push.
# id_rsa*
# credentials.txt
# .env
# source_credentials.sh
# Prevent .venv push to slim image, as cog uses a different interpreter anyways.
# .venv/
# Prevent any test outputs created from being in the image.
# outputs/
# predictions/
Great idea.
Reopening to track writing something down in addition to adding it to cog init template.