Dvc: Latest version of DVC does not work without GIT

Created on 11 Mar 2020  路  1Comment  路  Source: iterative/dvc

We build models locally and push them to DVC(S3) and we build docker containers(which are don't contain GIT). The old version 0.71.0 used to work fine but the latest version fails with the below error "ERROR: unexpected error - /my-folder is not a git repository"

enhancement p2-medium

Most helpful comment

More context here:

https://discordapp.com/channels/485586884165107732/485596304961962003/687403454989467650

Summary:

We broke the compatibility after we introduced the dvc init --subdir and made no-scm mode explicit. If .git is not found DVC expects to find the --no-scm flag in .dvc/config. If flag is also not found it raises this error.

Workaround:

run: dvc config core.no_scm true

It can be part of the script that creates a Docker image.

alternatively, include .git - it clearly can be suboptimal in some cases.

Proposed steps:

Since this error happens only in two situations:

  1. legacy scripts, code
  2. someone broke the existing repo (by deleting .git)

we can handle the error gracefully:

ERROR: /my-folder is not a Git repository. Since version DVC expects the directory it runs in to be a Git repository or explicit flag core.no_scm must be specified in the config. Run dvc config core.no_smc true if you don't need DVC to use Git in your setup. Read more information here -

>All comments

More context here:

https://discordapp.com/channels/485586884165107732/485596304961962003/687403454989467650

Summary:

We broke the compatibility after we introduced the dvc init --subdir and made no-scm mode explicit. If .git is not found DVC expects to find the --no-scm flag in .dvc/config. If flag is also not found it raises this error.

Workaround:

run: dvc config core.no_scm true

It can be part of the script that creates a Docker image.

alternatively, include .git - it clearly can be suboptimal in some cases.

Proposed steps:

Since this error happens only in two situations:

  1. legacy scripts, code
  2. someone broke the existing repo (by deleting .git)

we can handle the error gracefully:

ERROR: /my-folder is not a Git repository. Since version DVC expects the directory it runs in to be a Git repository or explicit flag core.no_scm must be specified in the config. Run dvc config core.no_smc true if you don't need DVC to use Git in your setup. Read more information here -

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ChrisHowlin picture ChrisHowlin  路  35Comments

kskyten picture kskyten  路  44Comments

danfischetti picture danfischetti  路  41Comments

ynop picture ynop  路  41Comments

Suor picture Suor  路  39Comments