Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest version of DVC does not work without GIT #3474

Open
sniranjan opened this issue Mar 11, 2020 · 1 comment
Open

Latest version of DVC does not work without GIT #3474

sniranjan opened this issue Mar 11, 2020 · 1 comment

Comments

@sniranjan
Copy link

@sniranjan sniranjan commented Mar 11, 2020

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"

@triage-new-issues triage-new-issues bot added the triage label Mar 11, 2020
@shcheklein

This comment has been minimized.

Copy link
Member

@shcheklein shcheklein commented Mar 11, 2020

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 -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.